/* ==========================================================================
   佛系云 · default 主题全局增强样式（business-white.css）
   职责：
   1. 补齐 sky-* 布局核心体系（default 主题原本完全缺失，导致会员中心排版塌陷）
   2. 商务白侧边栏（全站生效，不再只挂在 clientarea 单页）
   3. 用户中心信息卡片 / 费用卡片 / 双栏栅格
   该文件在 head.tpl 中全局引入，早于 usercenter-modern.css 加载。
   ========================================================================== */

/* --------------------------------------------------------------------------
   0. 全局变量
   -------------------------------------------------------------------------- */
:root {
    --sky-gap: 20px;
    --bw-brand: #0284c7;
    --bw-brand-deep: #0369a1;
    --bw-brand-soft: #f0f9ff;
    --bw-brand-line: #e0f2fe;
    --bw-ink: #1e293b;
    --bw-ink-2: #475569;
    --bw-ink-3: #94a3b8;
    --bw-line: #e2e8f0;
    --bw-line-soft: #eef2f6;
    --bw-mint: #10b981;
    --bw-mint-deep: #047857;
    --bw-mint-ink: #183d34;
    --bw-mint-line: #e6f0ec;
}

/* --------------------------------------------------------------------------
   1. sky-* 布局核心体系（关键修复：default 主题缺失）
   -------------------------------------------------------------------------- */
.sky-flex-container {
    display: flex !important;
    flex-wrap: nowrap !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: flex-start !important;
    gap: var(--sky-gap) !important;
    width: 100% !important;
}

.sky-flex-100 { flex: 1 1 100% !important;      width: 100% !important;      min-width: 0 !important; }
.sky-flex-80  { flex: 1 1 80% !important;       width: 80% !important;       min-width: 0 !important; }
.sky-flex-75  { flex: 1 1 75% !important;       width: 75% !important;       min-width: 0 !important; }
.sky-flex-66  { flex: 1 1 66.6666% !important;  width: 66.6666% !important;  min-width: 0 !important; }
.sky-flex-60  { flex: 1 1 60% !important;       width: 60% !important;       min-width: 0 !important; }
.sky-flex-50  { flex: 1 1 50% !important;       width: 50% !important;       min-width: 0 !important; }
.sky-flex-33  { flex: 1 1 33.3333% !important;  width: 33.3333% !important;  min-width: 0 !important; }
.sky-flex-30  { flex: 1 1 30% !important;       width: 30% !important;       min-width: 0 !important; }
.sky-flex-25  { flex: 1 1 25% !important;       width: 25% !important;       min-width: 0 !important; }

.sky-column {
    display: flex !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    justify-content: flex-start !important;
    width: 100% !important;
    min-width: 0 !important;
}

.sky-row {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    justify-content: flex-start !important;
    align-items: flex-start !important;
    width: 100% !important;
    min-width: 0 !important;
    gap: 20px;
}

.sky-wrap {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    justify-content: flex-start !important;
    width: 100% !important;
    gap: 20px;
}

.sky-row-txt {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
}

.sky-card {
    background: #ffffff !important;
    border: 1px solid var(--bw-mint-line) !important;
    border-radius: 10px !important;
    box-shadow: 0 2px 10px rgba(16, 62, 48, 0.05) !important;
    padding: 20px !important;
    margin-bottom: 20px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.sky-card > .sky-title,
.sky-card .sky-title {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    margin: 0 0 16px !important;
    padding: 0 0 10px !important;
    border-bottom: 1px solid var(--bw-mint-line) !important;
    color: var(--bw-mint-ink) !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    line-height: 1.4 !important;
}

.sky-card .sky-title.title-interval {
    border-bottom: 1px dashed #e1e6f0 !important;
}

.sky-card .sky-title a {
    display: inline-flex !important;
    align-items: center !important;
    flex: 0 0 auto !important;
    padding: 4px 12px !important;
    border: 1px solid var(--bw-line-soft) !important;
    border-radius: 4px !important;
    color: rgba(0, 0, 0, 0.78) !important;
    font-size: 12px !important;
    font-weight: 400 !important;
    line-height: 20px !important;
    text-decoration: none !important;
    transition: all 0.25s linear !important;
}
.sky-card .sky-title a:hover {
    color: var(--bw-mint-deep) !important;
    border-color: #a7f3d0 !important;
    background: #f0faf6 !important;
}

.sky-interval {
    display: block !important;
    padding-top: 18px !important;
    margin-top: 18px !important;
    border-top: 1px dashed #e1e6f0 !important;
}

/* --------------------------------------------------------------------------
   2. 用户中心信息卡片（头像 / 资料 / 二维码 三栏）
   -------------------------------------------------------------------------- */
.userInformation > .sky-row:first-of-type {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    gap: 16px !important;
    width: 100% !important;
}

.userInformation .user-avatar-area {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    flex: 0 0 108px !important;
    width: 108px !important;
    max-width: 108px !important;
    margin-right: 8px !important;
}

.userInformation .user-avatar-area .avatar {
    position: relative !important;
    width: 100px !important;
    height: 100px !important;
    min-width: 100px !important;
    min-height: 100px !important;
    border-radius: 14px !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12) !important;
}

.userInformation .user-avatar-area .avatar img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    border-radius: 14px !important;
}

/* 王者会员鎏金流光 */
.userInformation .user-avatar-area .avatar.avatar-v4-golden {
    width: 104px !important;
    height: 104px !important;
    min-width: 104px !important;
    min-height: 104px !important;
    padding: 3px !important;
    border-radius: 18px !important;
    box-sizing: border-box !important;
    box-shadow: 0 0 16px rgba(250, 204, 21, 0.8), 0 0 30px rgba(234, 179, 8, 0.45) !important;
    animation: bwV4GoldPulse 2.4s ease-in-out infinite alternate !important;
    isolation: isolate !important;
}
.userInformation .user-avatar-area .avatar.avatar-v4-golden img {
    border-radius: 15px !important;
    position: relative !important;
    z-index: 1 !important;
}
.v4-gold-conic-border {
    position: absolute !important;
    top: -50% !important;
    left: -50% !important;
    width: 200% !important;
    height: 200% !important;
    z-index: 0 !important;
    pointer-events: none !important;
    background: conic-gradient(from 0deg,
        #ffd700 0deg, #fff7a3 40deg, #ffffff 80deg, #fde047 120deg,
        #eab308 170deg, #fffbeb 210deg, #ffffff 250deg, #facc15 290deg,
        #ca8a04 330deg, #ffd700 360deg) !important;
    animation: bwV4ConicSpin 2.6s linear infinite !important;
}

@keyframes bwV4ConicSpin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
@keyframes bwV4GoldPulse {
    0%   { box-shadow: 0 0 10px rgba(250, 204, 21, 0.65), 0 0 20px rgba(234, 179, 8, 0.35); }
    100% { box-shadow: 0 0 20px rgba(250, 204, 21, 0.95), 0 0 38px rgba(253, 224, 71, 0.75); }
}

.userInformation > .sky-row:first-of-type > .sky-column {
    flex: 1 1 0% !important;
    min-width: 0 !important;
    margin-right: 10px !important;
}

/* ---------------------------------------------------------------------------
   ★ 修复「显示不全」（2026-10-14）：
   本卡所在 .sky-row 是 flex + space-between，同行还有
     头像区 (flex:0 0 108px) 与 QQ群区 (flex:0 0 236px)；
   本网格所在的信息列只分到 207px(1280) / 313px(1440)，
   两列网格 → 每格仅 94~147px，标签(flex:0 0 auto) 再占掉 50~85px，
   值就只剩 16~98px，配合 nowrap + ellipsis 表现为「只显示一两个字」。
   改为单列后每项独占整行 —— 实测 1440/1680px 截断数 = 0。
   --------------------------------------------------------------------------- */
.userInformation .userInformation-xs1 {
    display: grid !important;
    grid-template-columns: 1fr !important;
    align-items: center !important;
    gap: 2px 0 !important;
    width: 100% !important;
    margin-bottom: 6px !important;
}

.userInformation .userInformation-itme {
    display: flex !important;
    align-items: center !important;
    min-width: 0 !important;
    padding: 2px 0 !important;
    font-size: 12.5px !important;
    line-height: 1.6 !important;
}

.userInformation .userInformation-itme-name {
    flex: 0 0 auto !important;
    color: var(--bw-ink-3) !important;
    font-weight: 500 !important;
    white-space: nowrap !important;
}

.userInformation .userInformation-itme-email {
    color: var(--bw-ink) !important;
    font-weight: 600 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

.userInformation .binding {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 8px !important;
    margin-top: 8px !important;
}

.userInformation .binding i {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 30px !important;
    height: 30px !important;
    border-radius: 50% !important;
    background: #eaecf3 !important;
    color: #8a94a6 !important;
    font-size: 15px !important;
}
.userInformation .binding i.text-success {
    background: #dcfce7 !important;
    color: #16a34a !important;
}

/* ---- 官方 QQ 交流群面板（替代原二维码扫码块） ---- */
.userInformation .qq-group-section {
    /* ★ 修复「显示不全」：本区固定 236px（flex:0 0 236px）会挤压左侧
       「用户信息」列 —— 1100px 视口下信息列只剩 117px，标签占掉后值只有
       38~75px。压到 200px 把 36px 余量让给信息列（实测各视口均不劣化）。 */
    flex: 0 0 200px !important;
    width: 200px !important;
    max-width: 200px !important;
}

.userInformation .qq-group-head {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    font-size: 12.5px !important;
    font-weight: 700 !important;
    color: #0f766e !important;
}
.userInformation .qq-group-head-icon {
    width: 18px !important;
    height: 18px !important;
    object-fit: contain !important;
    display: block !important;
}

.userInformation .qq-group-list {
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

.userInformation .qq-group-item {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 6px 8px !important;
    border: 1px solid #d9f2e7 !important;
    border-radius: 8px !important;
    background: #f7fdfa !important;
    transition: all 0.18s ease !important;
}
.userInformation .qq-group-item:hover {
    border-color: #6ee7b7 !important;
    background: #ffffff !important;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.14) !important;
    transform: translateY(-1px) !important;
}
.userInformation .qq-group-icon {
    flex: 0 0 20px !important;
    width: 20px !important;
    height: 20px !important;
    object-fit: contain !important;
    display: block !important;
}
.userInformation .qq-group-text {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    font-size: 12px !important;
    line-height: 1.3 !important;
    color: #334155 !important;
    white-space: nowrap !important;
}
.userInformation .qq-group-label {
    color: #64748b !important;
    font-weight: 500 !important;
}
.userInformation .qq-group-number {
    position: relative !important;
    color: #0369a1 !important;
    font-weight: 700 !important;
    letter-spacing: 0.3px !important;
    cursor: pointer !important;
    border-bottom: 1px dashed #93c5fd !important;
}
.userInformation .qq-group-number:hover {
    color: #0284c7 !important;
}
.userInformation .qq-copy-tip {
    position: absolute !important;
    left: 50% !important;
    bottom: calc(100% + 4px) !important;
    transform: translateX(-50%) !important;
    padding: 1px 6px !important;
    border-radius: 4px !important;
    background: #0f766e !important;
    color: #ffffff !important;
    font-size: 10px !important;
    font-weight: 600 !important;
    white-space: nowrap !important;
    pointer-events: none !important;
}
.userInformation .qq-group-tag {
    flex: 0 0 auto !important;
    padding: 1px 6px !important;
    border-radius: 999px !important;
    font-size: 10.5px !important;
    font-weight: 700 !important;
    line-height: 1.6 !important;
    white-space: nowrap !important;
}
.userInformation .qq-group-tag.tag-full {
    background: #f1f5f9 !important;
    color: #64748b !important;
    border: 1px solid #e2e8f0 !important;
}
.userInformation .qq-group-tag.tag-priority {
    background: #dcfce7 !important;
    color: #15803d !important;
    border: 1px solid #86efac !important;
}
.userInformation .qq-group-tag.tag-backup {
    background: #fef3c7 !important;
    color: #b45309 !important;
    border: 1px solid #fcd34d !important;
}
.userInformation .qq-group-hint {
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
    color: #94a3b8 !important;
    font-size: 10.5px !important;
}

/* 底部快捷操作按钮行 */
.userInformation .userInformation-xs202 {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 8px !important;
    width: 100% !important;
}
.userInformation .userInformation-xs202 .btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important;
    margin: 0 !important;
}

/* --------------------------------------------------------------------------
   3. 温馨提醒公告（双列栅格）
   -------------------------------------------------------------------------- */
.top-notice .notice-items {
    display: grid !important;
    grid-template-columns: repeat(var(--cn-cols, 2), minmax(0, 1fr)) !important;
    gap: var(--cn-gap, 10px) var(--cn-gap-x, 14px) !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}
.top-notice .notice-item {
    display: flex !important;
    align-items: flex-start !important;
    gap: 10px !important;
    min-width: 0 !important;
    padding: var(--cn-item-pad, 10px 12px) !important;
    border: 1px solid var(--cn-item-border, #d4ede3) !important;
    border-radius: var(--cn-item-radius, 8px) !important;
    background: var(--cn-item-bg, rgba(255, 255, 255, 0.85)) !important;
    color: var(--cn-item-color, #275d50) !important;
    font-size: var(--cn-item-size, 13px) !important;
    line-height: 1.55 !important;
}
.top-notice .notice-item-icon {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 0 0 20px !important;
    width: 20px !important;
    height: 20px !important;
    margin-top: 1px !important;
    border-radius: 50% !important;
    background: var(--cn-badge-bg, #e2f7ef) !important;
    color: var(--cn-badge-color, #1a9c71) !important;
    font-size: 11px !important;
    font-weight: 700 !important;
}
.top-notice .notice-item-text {
    min-width: 0 !important;
    word-break: break-word !important;
}
.top-notice .notice-item-text strong {
    color: var(--cn-strong, #125748) !important;
}

/* --------------------------------------------------------------------------
   4. 商务白侧边栏（全站生效 · Business White Sidebar）
   -------------------------------------------------------------------------- */
body .vertical-menu,
body[data-sidebar="light"] .vertical-menu,
body[data-sidebar="dark"] .vertical-menu,
body[data-sidebar="colored"] .vertical-menu {
    background: #ffffff !important;
    border-right: 1px solid var(--bw-line) !important;
    box-shadow: 2px 0 16px rgba(15, 23, 42, 0.04) !important;
    transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

body .navbar-brand-box {
    background: #ffffff !important;
    border-right: 1px solid var(--bw-line) !important;
}
body .navbar-brand-box .logo-dark { display: block !important; }
body .navbar-brand-box .logo-light { display: none !important; }

/* --------------------------------------------------------------------------
   4b. LOGO —— 尺寸 / 顶栏高度 / 侧栏偏移 已整体移交 topbar.css
   --------------------------------------------------------------------------
   单一事实来源原则：这些值互相关联（顶栏高 → 侧栏 top → 内容 margin-left），
   分散在两个文件里互相覆盖会导致图标上浮、侧栏错位。全部集中在 topbar.css
   用 CSS 变量（--tb-h / --tb-side-w）统一控制。
   本文件只保留与全局主题相关的底色与亮/暗版切换（见上方 4 节）。
   -------------------------------------------------------------------------- */

/* --------------------------------------------------------------------------
   5. 响应式
   -------------------------------------------------------------------------- */
@media (max-width: 1200px) {
    .sky-flex-container { gap: 14px !important; }
    :root { --sky-gap: 14px; }
}

@media (max-width: 991.98px) {
    /* 移动端抽屉 */
    body.sidebar-enable .vertical-menu {
        display: block !important;
        position: fixed !important;
        top: 70px !important;
        bottom: 0 !important;
        left: 0 !important;
        width: 250px !important;
        z-index: 1005 !important;
        background: #ffffff !important;
        box-shadow: 4px 0 24px rgba(15, 23, 42, 0.15) !important;
    }

    /* 双栏塌成单栏 */
    .sky-flex-container {
        flex-wrap: wrap !important;
        flex-direction: column !important;
    }
    .sky-flex-66, .sky-flex-33, .sky-flex-80, .sky-flex-75,
    .sky-flex-60, .sky-flex-50, .sky-flex-30, .sky-flex-25 {
        flex: 1 1 100% !important;
        width: 100% !important;
    }
    .sky-flex-container > .sky-column,
    .sky-flex-container > .sky-container-left,
    .sky-flex-container > .sky-container-right {
        width: 100% !important;
        flex: 1 1 100% !important;
    }

    .userInformation > .sky-row:first-of-type {
        flex-wrap: wrap !important;
    }
    .userInformation .user-avatar-area {
        flex: 0 0 84px !important;
        width: 84px !important;
        max-width: 84px !important;
        margin-bottom: 10px !important;
    }
    .userInformation .user-avatar-area .avatar,
    .userInformation .user-avatar-area .avatar.avatar-v4-golden {
        width: 78px !important;
        height: 78px !important;
        min-width: 78px !important;
        min-height: 78px !important;
    }
    /* 移动端：QQ 群面板改为整行铺开，不再隐藏 */
    .userInformation .qq-group-section {
        flex: 1 1 100% !important;
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        padding-left: 0 !important;
        padding-top: 12px !important;
        border-left: 0 !important;
        border-top: 1.5px dashed #a7f3d0 !important;
    }
    .userInformation .qq-group-list {
        display: grid !important;
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 8px !important;
    }
    .userInformation .qq-group-text {
        white-space: normal !important;
    }
    .top-notice .notice-items {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 575.98px) {
    .userInformation .userInformation-xs1 {
        grid-template-columns: 1fr !important;
    }
    .userInformation .qq-group-list {
        grid-template-columns: 1fr !important;
    }
    .sky-card {
        padding: 14px !important;
    }
}

/* ---------------------------------------------------------------------------
 * 产品详情页：加宽「详细信息」侧栏，使其与顶部蓝色头图区的 UI 协调。
 *
 * 背景：详情页主体是 bootstrap 的 3/9 分栏
 *       <div class="row bottom-box">
 *         <div class="col-md-3">  ← 登录信息 / 流量 / 账单，内容多但只有 1/4 宽
 *         <div class="col-md-9">  ← 主内容
 * 3/9 会让左侧信息栏过窄（长 IP、长订单号频繁换行），
 * 这里整体调成 4/8，左侧多拿 8.33% 宽度。
 *
 * 作用域严格限定在 .bottom-box 内，且只在 ≥768px（bootstrap md 断点）
 * 生效 —— 小屏本来就是单列堆叠，不需要动。
 * 同时兼容 col-md-3 / col-lg-3 / col-xl-3 三种写法（各模板写法不统一）。
 * ------------------------------------------------------------------------- */
@media (min-width: 768px) {
    /* 左侧信息栏：3 → 4 */
    .bottom-box > .col-md-3,
    .bottom-box > .col-lg-3,
    .bottom-box > .col-xl-3 {
        flex: 0 0 33.333333% !important;
        max-width: 33.333333% !important;
    }
    /* 右侧主内容：9 → 8，保证两栏相加正好 100%，不会换行 */
    .bottom-box > .col-md-9,
    .bottom-box > .col-lg-9,
    .bottom-box > .col-xl-9 {
        flex: 0 0 66.666667% !important;
        max-width: 66.666667% !important;
    }
}

/* 侧栏内卡片留白稍微放松，配合变宽的栏宽 */
@media (min-width: 768px) {
    .bottom-box > .col-md-3 > .card > .card-body,
    .bottom-box > .col-lg-3 > .card > .card-body,
    .bottom-box > .col-xl-3 > .card > .card-body {
        padding: 1.15rem 1.15rem !important;
    }
    /* 侧栏里的长文本（IP、订单号、主机名）尽量不要撑破栏宽 */
    .bottom-box > .col-md-3 .card-body p,
    .bottom-box > .col-lg-3 .card-body p,
    .bottom-box > .col-xl-3 .card-body p {
        word-break: break-word !important;
    }
}
