/* ===================================================================
 * 全局样式覆盖
 * -------------------------------------------------------------------
 * 本文件在 head.php 里于主题 style.css 之后加载，
 * 因此这里的规则会覆盖主题默认样式。
 *
 * 目前包含：
 *   ① 侧边栏（操作菜单）的整体外观——卡片化
 *   ② 菜单项的图标与文字对齐
 *   ③ 悬浮、选中的交互反馈
 *
 * 侧边栏结构（由 column2.php + CPortlet + Menu 组件生成）：
 *   <div class="col-md-3" id="sidebar">
 *     <div class="portlet">
 *       <div class="portlet-title">标题</div>
 *       <div class="portlet-content">
 *         <ul class="operations">
 *           <li><a><svg class="mc-menu-icon">…</svg> 文字</a></li>
 * =================================================================== */

/* ---- 卡片容器 ---- */
#sidebar .portlet {
    background: #ffffff;
    border: 1px solid #e2edf8;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(44, 178, 255, .07);
    overflow: hidden;
    margin-bottom: 16px;
}

/* ---- 标题栏 ---- */
#sidebar .portlet-title,
#sidebar .portlet > .portlet-title,
#sidebar .portlet-header {
    background: #f4f9fe;
    border-bottom: 1px solid #eaf2fa;
    padding: 12px 16px;
    margin: 0;
    font-size: 13.5px;
    font-weight: 600;
    color: #33475c;
    letter-spacing: .3px;
    line-height: 1.45;
}
#sidebar .portlet-title .caption,
#sidebar .portlet-title b,
#sidebar .portlet-title strong {
    font-weight: 600;
    color: #33475c;
}
#sidebar .portlet-title i,
#sidebar .portlet-title .icon {
    color: #7fa4c4;
    margin-right: 6px;
}

/* ---- 内容区 ---- */
#sidebar .portlet-content,
#sidebar .portlet-body {
    padding: 8px;
    background: #fff;
}

/* ---- 菜单列表 ---- */
#sidebar ul.operations,
#sidebar ul.operations ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
#sidebar ul.operations > li {
    margin: 2px 0;
}

/* ---- 菜单项 ---- */
#sidebar ul.operations > li > a,
#sidebar ul.operations > li > span > a {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 12px;
    border-radius: 8px;
    color: #48627d;
    font-size: 13.5px;
    line-height: 1.45;
    text-decoration: none;
    transition: background .14s, color .14s, transform .14s;
}

#sidebar ul.operations > li > a:hover,
#sidebar ul.operations > li > a:focus {
    background: #eef7ff;
    color: #1f8fe8;
    text-decoration: none;
    transform: translateX(2px);
}

/* ---- SVG 图标 ---- */
#sidebar ul.operations > li > a .mc-menu-icon {
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
    color: #7fa4c4;
    transition: color .14s;
}
#sidebar ul.operations > li > a:hover .mc-menu-icon {
    color: #2cb2ff;
}

/* ---- 旧式图片图标（保留兼容）---- */
#sidebar ul.operations img {
    float: none;
    margin: 0 8px 0 0;
    vertical-align: middle;
}
#sidebar ul.operations > li > a > i,
#sidebar ul.operations > li > a > .fa {
    flex: 0 0 auto;
    width: 16px;
    text-align: center;
    color: #7fa4c4;
}

/* ---- 分隔线 ---- */
#sidebar ul.operations > li.divider {
    height: 1px;
    background: #eef5fb;
    margin: 6px 8px;
}

/* ---- 当前项 ---- */
#sidebar ul.operations > li.active > a {
    background: #e6f4ff;
    color: #1f8fe8;
    font-weight: 600;
}
#sidebar ul.operations > li.active > a .mc-menu-icon {
    color: #2cb2ff;
}

/* ---- 窄屏：侧边栏横向排列 ---- */
@media (max-width: 991px) {
    #sidebar .portlet-content {
        padding: 6px;
    }
    #sidebar ul.operations {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
    }
    #sidebar ul.operations > li {
        margin: 0;
    }
    #sidebar ul.operations > li > a {
        padding: 8px 12px;
    }
}

/* ===================================================================
 * 顶部导航栏
 * -------------------------------------------------------------------
 * 现状问题：
 *   · 纯文字无图标，功能不直观
 *   · 11 项平铺，缺少分组与间距
 *   · 无悬浮反馈，不知道哪项可点
 *   · 当前页无高亮
 *   · 背景是 rgb(212,212,236) 浅紫灰，与页面其他部分风格不统一
 *
 * 优化方向：
 *   ① 背景改为与整体一致的清爽白/浅蓝
 *   ② 每项做成圆角药丸，悬浮变淡蓝底
 *   ③ 当前页用主色高亮
 *   ④ 用竖线分隔「功能组」与「账户组」
 * =================================================================== */

/* ---- 导航容器 ----
   原来背景是 rgb(212,212,236) 浅紫灰，与页头 banner 融在一起对比度很低；
   这里改成半透明白 + 毛玻璃，并加一条细底边区分。 */
#navbar.navbar,
#navbar.navbar-inverse {
    background: rgba(255, 255, 255, 0.96) !important;
    border: none !important;
    border-bottom: 1px solid #dce9f5 !important;
    border-radius: 0 !important;
    box-shadow: 0 2px 14px rgba(16, 42, 67, .08) !important;
    min-height: 0 !important;
    padding: 0 16px !important;
    backdrop-filter: blur(10px);
    margin-bottom: 0 !important;
}

/* ---- 菜单列表：单行排列，不换行 ---- */
#navbar .navbar-collapse {
    padding: 0;
    border: none;
    box-shadow: none;
}
#navbar .navbar-nav {
    display: flex;
    align-items: center;
    /* 空间不够就换行 —— 菜单项少时是一行，多了自动排第二行。
       之前用 nowrap + 隐藏滚动条，多出来的项直接溢出到容器外，
       既看不见也滚不到，等于消失（加了「工单」「公告管理」后就撞上了）。 */
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
    float: none;
    width: 100%;
    overflow: visible;
}
#navbar .navbar-nav > li {
    float: none;
    margin: 0;
    /* flex-shrink:0 —— 空间不够时宁可溢出，也不要把文字挤掉 */
    flex: 0 0 auto;
    flex-shrink: 0;
    white-space: nowrap;
}

/* ---- 菜单项 ---- */
#navbar .navbar-nav > li > a {
    display: flex;
    align-items: center;
    gap: 5px;
    /* 左右留白 18px → 10px：10 个菜单项能省下约 160px。
       实测 9 项占 1170px（约 130px/项），10 项需要 1280px，
       比 1260px 的容器宽一点 —— 所以「注销登陆」会掉到第二行。
       收到 10px 后每项约 122px，10 项 1220px，放得下了。 */
    padding: 12px 10px !important;
    border-radius: 0;
    color: #46617c !important;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
    text-shadow: none !important;
    transition: background .15s, color .15s;
    white-space: nowrap;
    position: relative;
}

/* 悬浮：底部主色条 + 文字变色 */
#navbar .navbar-nav > li > a:not(.mc-menu-hot)::after {
    content: "";
    position: absolute;
    left: 13px;
    right: 13px;
    bottom: 0;
    height: 2px;
    background: #2cb2ff;
    border-radius: 2px 2px 0 0;
    transform: scaleX(0);
    transition: transform .18s;
}
#navbar .navbar-nav > li > a:not(.mc-menu-hot):hover::after {
    transform: scaleX(1);
}

#navbar .navbar-nav > li > a:hover,
#navbar .navbar-nav > li > a:focus {
    background: #f2f9ff !important;
    color: #1f8fe8 !important;
    text-decoration: none;
}

/* 当前页 */
#navbar .navbar-nav > li.active > a,
#navbar .navbar-nav > li > a.active {
    background: #eef7ff !important;
    color: #1f8fe8 !important;
    font-weight: 600;
}
#navbar .navbar-nav > li.active > a::after,
#navbar .navbar-nav > li > a.active::after {
    transform: scaleX(1);
}

/* ---- 图标 ---- */
#navbar .navbar-nav > li > a .mc-nav-icon {
    flex: 0 0 auto;
    color: #8fb0cd;
    transition: color .15s;
}
#navbar .navbar-nav > li > a:hover .mc-nav-icon {
    color: #2cb2ff;
}
#navbar .navbar-nav > li.active > a .mc-nav-icon {
    color: #1f8fe8;
}

/* ---- 下拉菜单 ---- */
#navbar .navbar-nav .dropdown-menu {
    background: #fff;
    border: 1px solid #e2edf8;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(16, 42, 67, .14);
    padding: 6px;
    margin-top: 0;
    font-size: 13.5px;
}
#navbar .navbar-nav .dropdown-menu > li > a {
    border-radius: 7px;
    padding: 8px 13px;
    color: #33475c;
}
#navbar .navbar-nav .dropdown-menu > li > a:hover {
    background: #eef7ff;
    color: #1f8fe8;
}

/* ---- 中等宽度：再压缩一档留白，尽量排在一到两行 ---- */
@media (min-width: 768px) and (max-width: 1200px) {
    #navbar .navbar-nav > li > a {
        padding: 12px 9px !important;
        font-size: 12.5px;
        gap: 6px;
    }
    #navbar .navbar-nav > li > a:not(.mc-menu-hot)::after {
        left: 9px;
        right: 9px;
    }
}

/* ---- 窄屏：菜单竖排 ---- */
@media (max-width: 767px) {
    #navbar.navbar {
        padding: 0 10px;
    }
    #navbar .navbar-nav {
        display: block;
        padding: 8px 0;
    }
    #navbar .navbar-nav > li {
        margin: 2px 0;
    }
    #navbar .navbar-nav > li > a {
        justify-content: flex-start;
    }

    /* Bootstrap 默认给折叠菜单设了 max-height: 340px 且 overflow-y:auto，
       菜单项多了后面的就被折在里面，必须滚动才能看到。
       这里放开高度限制，让所有项一次展开。 */
    #navbar .navbar-collapse {
        max-height: none !important;
        overflow-y: visible !important;
        border-top: 1px solid #e8f1fa;
        margin-top: 6px;
    }
}

/* ---- 顶部导航的图标 ---- */
#navbar .navbar-nav > li > a .mc-nav-icon {
    flex: 0 0 auto;
    color: #7fa4c4;
    transition: color .15s;
}
#navbar .navbar-nav > li > a:hover .mc-nav-icon {
    color: #1f8fe8;
}
#navbar .navbar-nav > li.active > a .mc-nav-icon,
#navbar .navbar-nav > li > a.active .mc-nav-icon {
    color: #ffffff;
}

/* ===================================================================
 * 首页欢迎区
 * -------------------------------------------------------------------
 * 结构（由 zh/mc.php 里的欢迎语生成）：
 *   <div class="mc-home">
 *     <div class="mc-home-hero">     标题 + 副标题 + 两个按钮
 *     <div class="mc-home-grid">     四张配置卡片
 *     <div class="mc-home-footer">   底部说明
 * 目标：把原来一长串 <br> 堆叠的纯文字，改成清爽的卡片布局。
 * =================================================================== */

.mc-home {
    max-width: 900px;
    margin: 0 auto;
    padding: 4px 0 16px;
    font-size: 13.5px;
    line-height: 1.7;
    color: #2f4459;
}

/* ---- 顶部横幅 ---- */
.mc-home-hero {
    background: linear-gradient(135deg, rgba(255,255,255,.96), rgba(240,249,255,.96));
    border: 1px solid #e2edf8;
    border-radius: 14px;
    padding: 26px 28px;
    box-shadow: 0 4px 18px rgba(44, 178, 255, .1);
    margin-bottom: 18px;
    backdrop-filter: blur(6px);
}
.mc-home-hero-title {
    font-size: 22px;
    font-weight: 700;
    color: #1b3a52;
    letter-spacing: .5px;
    margin-bottom: 6px;
}
.mc-home-hero-sub {
    font-size: 13.5px;
    color: #7b90a6;
    margin-bottom: 18px;
}

/* ---- 按钮 ---- */
.mc-home-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.mc-home-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 20px;
    border-radius: 9px;
    font-size: 13.5px;
    font-weight: 500;
    text-decoration: none !important;
    transition: all .16s;
    border: 1px solid #d7e6f3;
    background: #fff;
    color: #48627d !important;
}
.mc-home-btn:hover {
    background: #f2f9ff;
    border-color: #9ed3f7;
    color: #1f8fe8 !important;
    box-shadow: 0 4px 12px rgba(44, 178, 255, .18);
    transform: translateY(-1px);
    text-decoration: none;
}
.mc-home-btn.primary {
    background: linear-gradient(135deg, #2cb2ff, #1f9fe8);
    border: none;
    color: #fff !important;
    font-weight: 600;
    box-shadow: 0 3px 12px rgba(44, 178, 255, .32);
}
.mc-home-btn.primary:hover {
    box-shadow: 0 6px 18px rgba(44, 178, 255, .46);
    color: #fff !important;
}

/* ---- 配置卡片网格 ---- */
.mc-home-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}
.mc-home-card {
    background: rgba(255, 255, 255, .94);
    border: 1px solid #e2edf8;
    border-radius: 12px;
    padding: 16px 18px;
    box-shadow: 0 2px 10px rgba(44, 178, 255, .06);
    transition: border-color .18s, box-shadow .18s, transform .18s;
    backdrop-filter: blur(4px);
}
.mc-home-card:hover {
    border-color: #9fd4f5;
    box-shadow: 0 6px 18px rgba(44, 178, 255, .16);
    transform: translateY(-2px);
}
.mc-home-card-title {
    font-size: 12px;
    color: #93b8d6;
    letter-spacing: .6px;
    margin-bottom: 6px;
    text-transform: uppercase;
}
.mc-home-card-value {
    font-size: 15px;
    font-weight: 600;
    color: #1b3a52;
    margin-bottom: 3px;
}
.mc-home-card-note {
    font-size: 12.5px;
    color: #94a9bd;
}

/* ---- 底部说明 ---- */
.mc-home-footer {
    text-align: center;
    font-size: 13px;
    color: #7b90a6;
    padding: 14px 16px;
    background: rgba(255, 255, 255, .82);
    border: 1px dashed #d7e6f3;
    border-radius: 10px;
    line-height: 1.7;
}

@media (max-width: 640px) {
    .mc-home-hero { padding: 20px 18px; }
    .mc-home-hero-title { font-size: 18px; }
    .mc-home-grid { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
    .mc-home-btn { padding: 8px 15px; font-size: 13px; }
}

/* ===================================================================
 * 侧边栏子菜单：与父项左对齐
 * -------------------------------------------------------------------
 * 结构（CMenu 生成的嵌套列表）：
 *   <ul class="operations">
 *     <li>
 *       <a id="manage_main">管理服务器数据</a>
 *       <ul id="manage">              ← 缩进就出在这个 ul 上
 *         <li><a>管理玩家</a></li>
 *         <li><a>管理命令</a></li>
 *       </ul>
 *     </li>
 *   </ul>
 *
 * 缩进来自浏览器/Bootstrap 给嵌套 ul 的默认 padding-left。
 * 这里把内边距与列表标记全部清掉，让子项的图标与父项图标
 * 处在同一条竖直线上，只靠图标颜色深浅体现层级。
 * =================================================================== */

/* （此处的旧嵌套菜单规则已删除：它们用 !important 强制
   「子项与父项左边缘对齐」，与「二级项右移分层」的设计冲突，
   会把新规则全部压掉。见文件末尾的分组菜单样式。） */
/* 右侧装饰光斑，避免大片留白显得空 */


/* ===================================================================
 * 提高不透明度：让内容区在背景图上依然清晰
 * -------------------------------------------------------------------
 * 现象：面板背景是一张动漫图，而卡片用了 rgba(255,255,255,.85~.92)，
 *       85% 白在深色背景上仍会透出大量图案，文字对比度不足。
 * 处理：把面板内的容器统一提到 96~98% 不透明白，
 *       表格行密集区域用完全不透明，保证长文本可读。
 * =================================================================== */

/* ---- 内容卡片（首页、表单页等）---- */
.mc-page {
    background: rgba(255, 255, 255, 0.97) !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(16, 42, 67, .1);
}

/* ---- 小卡片 ---- */
.mc-card {
    background: rgba(255, 255, 255, 0.97) !important;
    backdrop-filter: blur(8px);
}

/* ---- 侧边栏 ---- */
#sidebar .portlet {
    background: rgba(255, 255, 255, 0.97) !important;
    backdrop-filter: blur(8px);
    box-shadow: 0 3px 14px rgba(16, 42, 67, .1);
}
#sidebar .portlet-content {
    background: rgba(255, 255, 255, 0.98) !important;
}

/* ---- 栅格表格（服务器列表、玩家列表等）---- */
.grid-view,
.grid-view table.items {
    background: rgba(255, 255, 255, 0.98) !important;
}

.grid-view table.items th {
    background: #f4f9fe !important;
    background-image: none !important;
}

.grid-view table.items tr,
.grid-view table.items td {
    background-color: rgba(255, 255, 255, 0.98) !important;
}

.grid-view table.items tr:hover td,
.grid-view table.items tr.odd:hover td,
.grid-view table.items tr.even:hover td {
    background-color: #f5fbff !important;
}

/* 交替行给一点点色差，但仍保持不透明 */
.grid-view table.items tr.odd td {
    background-color: rgba(252, 254, 255, 0.98) !important;
}

/* ---- 通用表格（不限于 grid-view）---- */
.table {
    background-color: rgba(255, 255, 255, 0.98) !important;
}
.table > thead > tr > th {
    background-color: #f4f9fe !important;
}
.table > tbody > tr > td {
    background-color: rgba(255, 255, 255, 0.98) !important;
}

/* ---- 表单控件 ---- */
.form-control,
input[type=text],
input[type=password],
input[type=email],
textarea,
select {
    background-color: rgba(255, 255, 255, 0.99) !important;
}

/* ---- 面包屑 ---- */
.breadcrumb {
    background: rgba(255, 255, 255, 0.97) !important;
}

/* ---- 分页 ---- */
.pagination > li > a,
.pagination > li > span {
    background: rgba(255, 255, 255, 0.98) !important;
}


/* ---- 导航栏 ---- */
#navbar.navbar {
    background: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(12px);
}

/* ---- 弹窗 ---- */
.modal-content {
    background: rgba(255, 255, 255, 0.99) !important;
}

/* ---- 下拉菜单 ---- */
.dropdown-menu {
    background: rgba(255, 255, 255, 0.99) !important;
}

/* ===================================================================
 * 内容容器的透明度与外形
 * -------------------------------------------------------------------
 * 主题给 .container 设的是 opacity: 0.8，整体只有八成不透明，
 * 背景图会透到文字上；直接改成 1 又太死板，背景图只在最边缘露一条。
 *
 * 这里取 94%：背景隐约可见、保留氛围，文字对比度也够。
 * 同时清掉主题遗留的 filter:alpha（老 IE 写法，现代浏览器不需要），
 * 避免与其他透明度设置叠加。
 * =================================================================== */
.container {
    opacity: 0.94 !important;
    filter: none !important;
    -moz-opacity: 0.94 !important;
    -khtml-opacity: 0.94 !important;
    max-width: 1400px;
    padding-left: 20px;
    padding-right: 20px;
}

/* #content 是整行的容器（内含侧边栏列与内容列），
   本身不该有卡片外观 —— 否则与内部两栏的卡片叠加，
   会出现多余的边角，也会因 padding 挤压导致列宽算错、露出页面背景。
   这里只保留与导航之间的间距，其余交给栏内的卡片。 */
#content {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    margin-top: 14px !important;
    box-shadow: none !important;
}

/* 两栏各自的卡片：侧边栏的 .portlet 与内容列，
   用相同的圆角、边框、阴影，保证观感一致、顶边对齐。 */
#sidebar .portlet {
    background: rgba(255, 255, 255, 0.97) !important;
    border: 1px solid rgba(226, 237, 248, 0.9) !important;
    border-radius: 14px !important;
    box-shadow: 0 4px 20px rgba(16, 42, 67, .08) !important;
    overflow: hidden;
}

.col-md-9.col-md-offset-3,
.col-md-9.col-md-offset-3.col-toppad {
    background: rgba(255, 255, 255, 0.97) !important;
    border: 1px solid rgba(226, 237, 248, 0.9) !important;
    border-radius: 14px !important;
    box-shadow: 0 4px 20px rgba(16, 42, 67, .08) !important;
    padding: 18px 20px !important;
    margin-left: 0 !important;
    min-height: 420px;
}

#navbar.navbar {
    border-radius: 0 0 14px 14px;
    margin-bottom: 0;
}

/* ===================================================================
 * 服务器 / 玩家列表行
 * -------------------------------------------------------------------
 * 原来每行是一块纯灰底方块，紧凑且没有层次。
 * 这里改成：交替底色 + 圆角 + 悬浮高亮 + 左侧状态条。
 * =================================================================== */
.grid-view table.items {
    border-collapse: separate !important;
    border-spacing: 0 6px !important;   /* 行之间留缝，形成卡片感 */
    background: transparent !important;
}

.grid-view table.items tr {
    background: transparent !important;
}

.grid-view table.items tr td {
    background: rgba(246, 250, 254, 0.95) !important;
    border: none !important;
    border-top: 1px solid #eaf2fa !important;
    border-bottom: 1px solid #eaf2fa !important;
    padding: 12px 14px !important;
    transition: background .15s;
}

/* 行的第一个与最后一个单元格做圆角 */
.grid-view table.items tr td:first-child {
    border-left: 1px solid #eaf2fa !important;
    border-radius: 10px 0 0 10px;
}
.grid-view table.items tr td:last-child {
    border-right: 1px solid #eaf2fa !important;
    border-radius: 0 10px 10px 0;
}

/* 交替行给一点点色差 */
.grid-view table.items tr.odd td {
    background: rgba(242, 248, 254, 0.95) !important;
}

/* 悬浮：整体提亮并左移一点点 */
.grid-view table.items tr:hover td {
    background: #eaf6ff !important;
    border-color: #cfe6f8 !important;
}

/* 表头：与行保持同样的圆角风格，但不留行间距 */
.grid-view table.items th {
    background: #f4f9fe !important;
    border: none !important;
    border-bottom: 1px solid #e2edf8 !important;
    padding: 11px 14px !important;
    color: #58708a !important;
    font-weight: 600 !important;
    font-size: 12.5px !important;
    letter-spacing: .3px;
}

/* 表格外框 */
.grid-view {
    border: none !important;
    padding: 0 !important;
    background: transparent !important;
}

/* 分页与汇总文字 */
.grid-view .summary {
    font-size: 12.5px;
    color: #7b90a6;
    margin-bottom: 8px;
}
.grid-view .pager {
    margin-top: 14px;
}

/* ===================================================================
 * 侧边栏容器
 * -------------------------------------------------------------------
 * 主题原样式：
 *   #sidebar { position: absolute; height: 100%; background: #f5f5f5; }
 * 三个问题：
 *   · position:absolute 让侧边栏脱离文档流，会盖到内容上
 *   · height:100% 撑出一个空的灰色底座（截图里那块多余的白框）
 *   · #f5f5f5 灰底与卡片风格不搭
 *
 * 处理：改回普通流式布局，去掉固定高度与底色，
 *       外观完全交给内部的 .portlet 卡片来表现。
 * =================================================================== */
#sidebar {
    position: static !important;
    height: auto !important;
    background: transparent !important;
    padding: 0 !important;
    padding-right: 12px !important;
    margin-bottom: 16px;
}

/* 侧边栏里的链接：去掉主题的上下画线，交给 .portlet 卡片控制外观 */
#sidebar a {
    border-bottom: none !important;
    border-top: none !important;
    text-shadow: none !important;
}

/* 去掉主题那个用绝对定位画出来的悬浮竖条 */
#sidebar a:hover:before,
#sidebar a:before {
    display: none !important;
}

/* 子菜单的白色底也去掉，整体融入卡片 */
#sidebar li ul {
    background: transparent !important;
}

/* ul 的负边距会让内容撑出卡片，归零 */
#sidebar ul {
    margin: 0 !important;
    padding: 0 !important;
}

/* ===================================================================
 * 修正两栏换行
 * -------------------------------------------------------------------
 * 布局结构：
 *   <div class="row" id="content">
 *       <div class="col-md-3" id="sidebar">              侧边栏
 *       <div class="col-md-9 col-md-offset-3 col-toppad"> 内容
 *
 * 主题原本靠 #sidebar { position: absolute } 让侧边栏脱离文档流，
 * 那时 offset-3 是用来「空出左侧 3 格」的，没问题。
 * 但把侧边栏改成 static 之后（为了不让它盖住内容、也不撑出空底座），
 * 侧边栏本身就占了 3 格，再叠加 offset-3 就变成 3+3+9=15 格，
 * 超过一行 12 格的上限，内容列被挤到下一行。
 *
 * 处理：去掉 offset，回到 3+9=12 的标准两栏。
 * =================================================================== */
.col-md-9.col-md-offset-3,
.col-md-9.col-md-offset-3.col-toppad {
    margin-left: 0 !important;
}

/* 内容列的内边距：上下左右一致，与左侧卡片顶边对齐 */
.col-md-9.col-md-offset-3.col-toppad {
    padding-top: 18px !important;
    padding-bottom: 18px !important;
}

/* 侧边栏不需要右侧内边距，避免两栏之间缝隙过大 */
#sidebar.col-md-3 {
    padding-right: 8px !important;
}
.col-md-9.col-md-offset-3 {
    padding-left: 8px !important;
}

/* ===================================================================
 * 修复横幅右侧的白色竖边
 * -------------------------------------------------------------------
 * 模板结构：<div class="row" id="header"><div id="logo">…</div></div>
 *
 * 问题：Bootstrap 给 .row 设了 margin-left/right: -15px，用来抵消列的内边距。
 *       但 #header 里并没有标准栅格列，这个负边距就让整块横幅向左突出 15px，
 *       右边则空出一条缝，露出下层容器的白底 —— 截图里那条白边。
 *
 * 处理：把 #header 的负边距归零，并让内部的 #logo 补上左右内边距，
 *       这样横幅就能严丝合缝地铺满父容器。
 * =================================================================== */
#header.row,
.row#header {
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: auto !important;
    box-sizing: border-box;
}

#header #logo,
#header > div {
    padding-left: 15px;
    padding-right: 15px;
    box-sizing: border-box;
}

/* 标题在横幅内不要溢出 */
#header h1 {
    margin: 0 !important;
    padding: 0 !important;
    word-break: break-word;
}

/* ===================================================================
 * 登录页（mini 布局）的横幅撑满
 * -------------------------------------------------------------------
 * 结构：
 *   <div id="page">
 *     <div id="mini">             ← 固定 500px，左右各有 15px 内边距
 *       <div class="row" id="header">    ← 横幅
 *
 * #mini 的 padding: 0 15px 会把横幅左右各推开 15px，
 * 在条纹背景上就显出两条白边。用负边距把横幅拉回去，
 * 让它与卡片左右边缘齐平，同时给内部文字补回内边距。
 * =================================================================== */
#mini > #header,
#mini > .row#header {
    margin-left: -15px !important;
    margin-right: -15px !important;
    border-radius: 5px 5px 0 0;
    overflow: hidden;
}

/* 横幅内部文字保持与卡片内容对齐 */
#mini > #header h1 {
    padding-left: 15px !important;
    padding-right: 15px !important;
}

/* 导航条同样处理，避免与横幅错位 */
#mini > #navbar {
    margin-left: -15px !important;
    margin-right: -15px !important;
    border-radius: 0;
}

/* 内容区左右内边距保持不变（主题给的是 20px） */
#mini > #content {
    margin-left: 0;
    margin-right: 0;
}

/* 窄屏下 #mini 的内边距会变，横幅跟着调整 */
@media (max-width: 520px) {
    #mini > #header,
    #mini > .row#header,
    #mini > #navbar {
        margin-left: -18px !important;
        margin-right: -18px !important;
    }
}

/* ===================================================================
 * 登录页横幅贴合（改用 padding 归零的方式）
 * -------------------------------------------------------------------
 * 上一版用「负边距」把横幅拉出去，但 #mini 带 overflow:hidden，
 * 负边距会被裁掉，反而让内容整体偏移，右侧仍留白。
 *
 * 更直接的做法：把 #mini 的左右内边距去掉，
 * 让横幅天然铺满，再给横幅内部的文字单独补内边距。
 * =================================================================== */
#mini {
    padding-left: 0 !important;
    padding-right: 0 !important;
    padding-top: 0 !important;          /* 顶部也不要留白，横幅直接贴边 */
    background: #fff;
    border-radius: 16px !important;
    overflow: hidden;
}

/* 清掉上一版的负边距，避免叠加 */
#mini > #header,
#mini > .row#header,
#mini > #navbar {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* 横幅与导航内部补回内边距，文字不贴边 */
#mini > #header h1 {
    padding: 0 20px !important;
}
#mini > #navbar .navbar-nav {
    padding-left: 20px;
}

/* 内容区恢复左右内边距 */
#mini > #content {
    padding: 20px !important;
}

/* 把 #mini 的圆角与阴影统一成与内容页一致 */
#mini {
    border: 1px solid rgba(226, 237, 248, 0.9);
    box-shadow: 0 12px 40px rgba(16, 42, 67, .18) !important;
}

/* ===================================================================
 * 主布局（main）的横幅与导航撑满
 * -------------------------------------------------------------------
 * 结构：
 *   <div class="container">        ← 左右各有 20px 内边距
 *     <div class="row" id="header">     横幅
 *     <nav id="navbar">                 导航
 *     <div class="row" id="content">    内容
 *
 * 横幅和导航被这 20px 内边距推开，左右各留一条白边（截图里那两条）。
 * 处理：把这两块负向拉出去，与容器边缘齐平；
 *       内容区保持内边距不变。
 * =================================================================== */
.container > #header,
.container > .row#header {
    margin-left: -20px !important;
    margin-right: -20px !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    border-radius: 0;
    box-sizing: border-box;
    width: auto !important;
}

/* 横幅内部文字补回内边距，保持与页面其他内容左对齐 */
.container > #header h1,
.container > #header #logo {
    padding-left: 20px !important;
    padding-right: 20px !important;
    box-sizing: border-box;
}

/* 导航同样撑满 */
.container > #navbar,
.container > nav#navbar {
    margin-left: -20px !important;
    margin-right: -20px !important;
    width: auto !important;
    box-sizing: border-box;
}

/* 导航内部列表补回内边距 */
.container > #navbar .navbar-nav {
    padding-left: 20px !important;
    padding-right: 20px !important;
}

/* 窄屏：容器内边距变小时同步调整 */
@media (max-width: 767px) {
    .container > #header,
    .container > .row#header,
    .container > #navbar {
        margin-left: -15px !important;
        margin-right: -15px !important;
    }
    .container > #header h1,
    .container > #header #logo,
    .container > #navbar .navbar-nav {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
}

/* ===================================================================
 * 顶部导航：加大尺寸
 * -------------------------------------------------------------------
 * 原来的菜单项 padding 是 15px 14px，视觉上偏紧凑，
 * 图标与文字也贴得较近。这里整体放大一档：
 *   · 行高 48 → 56px
 *   · 字号 13.5 → 14.5px
 *   · 图标 15 → 17px
 *   · 项间距加大
 * =================================================================== */
#navbar.navbar,
#navbar.navbar-inverse {
    min-height: 56px !important;
    padding: 0 22px !important;
}

#navbar .navbar-nav {
    padding: 6px 0;
    gap: 6px;
}

#navbar .navbar-nav > li {
    margin: 0 3px;
}

#navbar .navbar-nav > li > a {
    padding: 12px 10px !important;
    font-size: 13px !important;
    gap: 5px !important;
    border-radius: 10px !important;
    line-height: 1.45 !important;
}

/* 图标放大 */
#navbar .navbar-nav > li > a .mc-nav-icon,
#navbar .navbar-nav > li > a svg {
    width: 17px !important;
    height: 17px !important;
    flex: 0 0 17px !important;
}

/* 悬浮下划线跟着加宽 */
#navbar .navbar-nav > li > a:not(.mc-menu-hot)::after {
    left: 20px !important;
    right: 20px !important;
    height: 3px !important;
}

/* 导航内部左右内边距同步 */
.container > #navbar .navbar-nav {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* 窄屏时收一收 */
@media (max-width: 767px) {
    #navbar.navbar {
        padding: 0 12px !important;
        min-height: 50px !important;
    }
    #navbar .navbar-nav > li > a {
        padding: 12px 14px !important;
        font-size: 13.5px !important;
    }
}

/* ===================================================================
 * 导航选中态：下划线收进圆角框内
 * -------------------------------------------------------------------
 * 现象：选中项有一条蓝色下划线，两端超出了圆角高亮框，看起来「没对齐」。
 * 原因：下划线用 ::after 绝对定位，left/right 是按老的 padding 写死的；
 *       后来把内边距改成 20px、字体也放大了，两者就对不上了。
 * 处理：让下划线跟随圆角框的宽度和内边距，
 *       并把圆角框本身的内边距与下划线位置绑在一起。
 * =================================================================== */
#navbar .navbar-nav > li > a {
    position: relative;
    padding-top: 12px !important;
    padding-bottom: 6px !important;    /* 给下划线留出空间 */
}

#navbar .navbar-nav > li > a:not(.mc-menu-hot)::after {
    left: 16px !important;
    right: 16px !important;
    bottom: 4px !important;
    height: 3px !important;
    border-radius: 2px !important;
    background: #2cb2ff !important;
}

/* 选中态：圆角框与下划线保持一致 */
#navbar .navbar-nav > li.active > a,
#navbar .navbar-nav > li > a.active {
    padding-bottom: 6px !important;
    background: #eef7ff !important;
    border-radius: 10px !important;
}
#navbar .navbar-nav > li.active > a::after,
#navbar .navbar-nav > li > a.active::after {
    transform: scaleX(1) !important;
    left: 16px !important;
    right: 16px !important;
    bottom: 4px !important;
}

/* 悬浮态同理 */
#navbar .navbar-nav > li > a:not(.mc-menu-hot):hover::after {
    transform: scaleX(1) !important;
}

/* ===================================================================
 * 导航下划线：从文字起点开始
 * -------------------------------------------------------------------
 * 现状：下划线覆盖整个菜单项（含图标），视觉上下划线把图标也框住了。
 * 目标：下划线只对应文字部分，从文字左边缘开始、到文字右边缘结束。
 *
 * 做法：菜单项是 flex 布局，结构为
 *         <a><svg 图标/> 文字</a>
 *       图标固定 17px 宽，间距 9px，所以文字起点 = 内边距左 + 17 + 9。
 *       下划线的 left 直接按这个值算，右侧留同样的内边距。
 * =================================================================== */
#navbar .navbar-nav > li > a:not(.mc-menu-hot)::after {
    left: 46px !important;      /* 20(内边距) + 17(图标) + 9(间距) */
    right: 20px !important;     /* 与右侧内边距对齐 */
    bottom: 4px !important;
    height: 3px !important;
    border-radius: 2px !important;
}

/* 选中与悬浮态保持同样位置 */
#navbar .navbar-nav > li.active > a::after,
#navbar .navbar-nav > li > a.active::after,
#navbar .navbar-nav > li > a:not(.mc-menu-hot):hover::after {
    left: 46px !important;
    right: 20px !important;
    bottom: 4px !important;
}

/* 没有图标的项（例如纯文字项），下划线退回正常内边距 */
#navbar .navbar-nav > li > a:not(:has(.mc-nav-icon)):not(:has(svg))::after {
    left: 20px !important;
    right: 20px !important;
}

/* 窄屏：图标与间距略小，下划线跟着前移 */
@media (max-width: 767px) {
    #navbar .navbar-nav > li > a:not(.mc-menu-hot)::after,
    #navbar .navbar-nav > li.active > a::after,
    #navbar .navbar-nav > li > a.active::after,
    #navbar .navbar-nav > li > a:not(.mc-menu-hot):hover::after {
        left: 39px !important;   /* 14(内边距) + 17(图标) + 8(间距) */
        right: 14px !important;
    }
    #navbar .navbar-nav > li > a:not(:has(.mc-nav-icon)):not(:has(svg))::after {
        left: 14px !important;
        right: 14px !important;
    }
}

/* ===================================================================
 * 导航项：修正选中框宽度与图标颜色
 * -------------------------------------------------------------------
 * 两个问题：
 *   ① 选中框右边偏窄，文字尾部露在框外 —— 下划线的 right 值把内容
 *      挤到了边框之外；同时 padding-bottom 过大让框看起来只包住上半截。
 *   ② 选中项的图标被设成了白色（原本是给深色底准备的），
 *      但在浅蓝底上就几乎看不见了。
 *
 * 处理：
 *   · 统一左右内边距，让圆角框完整包住 图标 + 文字
 *   · 下划线只负责装饰，不再影响盒子尺寸
 *   · 选中态图标改为主色蓝，与文字一致
 * =================================================================== */
#navbar .navbar-nav > li > a {
    padding: 12px 10px !important;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    border-radius: 10px !important;
    overflow: hidden;              /* 让下划线不越出圆角 */
}

/* 下划线：相对圆角框内缩，不参与布局
   —— 粉色项不画下划线（底色已足够醒目），用 :not 排除掉，
      避免它和圆角底框叠在一起像多出两条短杠。 */
#navbar .navbar-nav > li > a:not(.mc-menu-hot)::after {
    position: absolute;
    left: 46px !important;         /* 22 + 17 + 7 */
    right: 22px !important;
    bottom: 6px !important;
    height: 3px !important;
    border-radius: 2px !important;
    background: #2cb2ff !important;
    pointer-events: none;
}

/* 悬停与选中：同样的位置 */
#navbar .navbar-nav > li:not(.mc-menu-hot) > a:hover::after,
#navbar .navbar-nav > li.active > a:not(.mc-menu-hot)::after,
#navbar .navbar-nav > li > a:not(.mc-menu-hot).active::after {
    left: 46px !important;
    right: 22px !important;
    bottom: 6px !important;
    transform: scaleX(1) !important;
}

/* 选中态的图标：改成主色蓝，不再是白色 */
#navbar .navbar-nav > li.active > a .mc-nav-icon,
#navbar .navbar-nav > li > a.active .mc-nav-icon,
#navbar .navbar-nav > li.active > a svg,
#navbar .navbar-nav > li > a.active svg {
    color: #1f8fe8 !important;
    fill: currentColor;
    opacity: 1 !important;
}

/* 选中态文字色 */
#navbar .navbar-nav > li.active > a,
#navbar .navbar-nav > li > a.active {
    color: #1f8fe8 !important;
    background: #eef7ff !important;
}

/* 无图标项的下划线退回正常内边距 */
#navbar .navbar-nav > li > a:not(:has(.mc-nav-icon)):not(:has(svg))::after {
    left: 22px !important;
    right: 22px !important;
}

/* 窄屏 */
@media (max-width: 767px) {
    #navbar .navbar-nav > li > a {
        padding: 12px 16px 14px 16px !important;
    }
    #navbar .navbar-nav > li > a:not(.mc-menu-hot)::after,
    #navbar .navbar-nav > li > a:not(.mc-menu-hot):hover::after,
    #navbar .navbar-nav > li.active > a::after,
    #navbar .navbar-nav > li > a.active::after {
        left: 39px !important;
        right: 16px !important;
        bottom: 5px !important;
    }
    #navbar .navbar-nav > li > a:not(:has(.mc-nav-icon)):not(:has(svg))::after {
        left: 16px !important;
        right: 16px !important;
    }
}

/* ===================================================================
 * 套餐页专用：放宽 mini 布局
 * -------------------------------------------------------------------
 * mini 布局是给登录页设计的，固定 500px 宽，
 * 而套餐页要并排放多张卡片，500px 挤得很难看。
 *
 * 做法：给 body 加一个标记类，只在这个页面上覆盖宽度。
 * 标记由套餐视图通过 Yii::app()->clientScript 注入。
 * =================================================================== */
body.mc-wide-page #mini {
    width: auto;
    max-width: 1180px;
    margin-left: 24px;
    margin-right: 24px;
    text-align: left;              /* 卡片里的文字左对齐更自然 */
}

/* 卡片区在宽屏下多排几列 */
body.mc-wide-page #mini .mc-price-grid {
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

/* 横幅和导航保持居中 */
body.mc-wide-page #mini > #header,
body.mc-wide-page #mini > #navbar {
    text-align: center;
}

/* 屏幕够宽时用居中布局 */
@media (min-width: 1240px) {
    body.mc-wide-page #mini {
        margin-left: auto;
        margin-right: auto;
    }
}

/* 窄屏下退回单列，避免卡片被压扁 */
@media (max-width: 760px) {
    body.mc-wide-page #mini {
        margin-left: 10px;
        margin-right: 10px;
    }
    body.mc-wide-page #mini .mc-price-grid {
        grid-template-columns: 1fr;
    }
}

/* ===================================================================
 * 导航菜单字体放大
 * -------------------------------------------------------------------
 * 菜单项原来 13.5px，在高分屏上偏小。
 * 放大到 15px，同时把内边距稍微收一点，
 * 免得整体变宽后菜单项挤在一起。
 * =================================================================== */
#navbar .navbar-nav > li > a {
    font-size: 13px;
    font-weight: 600;
    padding: 12px 10px !important;
}

/* 菜单里的图标跟着大一点 */
#navbar .navbar-nav > li > a .mc-nav-icon svg,
#navbar .navbar-nav > li > a svg {
    width: 17px;
    height: 17px;
}

@media (max-width: 980px) {
    #navbar .navbar-nav > li > a {
        font-size: 14px;
        padding: 14px 12px !important;
    }
}

/* ===================================================================
 * 放宽 mini 布局（登录页 / 首页 / 套餐页共用）
 * -------------------------------------------------------------------
 * 主题给 #mini 定的是固定 500px，在宽屏上显得很小，
 * 页面两侧留大片空白，内容挤在中间。
 *
 * 现在改成响应式宽度：
 *   · 最宽 1180px（与套餐页卡片区一致）
 *   · 屏幕窄时自动收边距
 *   · 内容居中
 * =================================================================== */
#mini {
    width: auto !important;
    max-width: 1180px;
    /* 主题原来 margin-top 是 200px（窄条居中时的留白），
       放宽后收到 40px，避免顶部一大片空白 */
    margin: 40px auto 40px !important;
    text-align: left;              /* 卡片/表格左对齐更自然 */
}

/* 登录 / 注册 / 找回密码：内容少，窗口收窄更协调 */
body.mc-narrow #mini {
    max-width: 620px;
}

/* 横幅与导航保持居中，视觉上更像一个整体 */
#mini > #header,
#mini > #navbar,
#mini > #header h1,
#mini #logo {
    text-align: center;
}

/* 表格类内容铺满宽度 */
#mini #content {
    text-align: left;
}

/* 屏幕较窄时留一点边距 */
@media (max-width: 1230px) {
    #mini {
        margin-left: 20px !important;
        margin-right: 20px !important;
    }
}

@media (max-width: 760px) {
    #mini {
        margin-left: 10px !important;
        margin-right: 10px !important;
    }
}

/* ===================================================================
 * 登录 / 注册表单：限制宽度并居中
 * -------------------------------------------------------------------
 * 放宽 #mini 之后，表单控件跟着撑满整行，输入框变得很长，
 * 看着不像登录框。
 *
 * 处理：把表单区限制在 420px 并居中；
 *       提示文字也一起居中，保持视觉对称。
 * =================================================================== */
#mini #content > .form,
#mini #content .form {
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
}

/* 表单里的输入框铺满这 420px，而不是整页 */
#mini .form .form-control,
#mini .form input[type="text"],
#mini .form input[type="password"],
#mini .form input[type="email"] {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 14px;
    font-size: 14.5px;
}

/* 「注册」提示语和成功提示居中 */
#mini #content > p,
#mini #content > .flash-success,
#mini #content > .flash-error {
    text-align: center;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
}

/* 「保持登录状态 / 允许IP变化」两列在小宽度下也要对齐 */
#mini .form .rememberMe {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    max-width: 420px;
    margin: 0 auto;
}
#mini .form .rememberMe .form-group {
    width: auto;
}

/* 登录按钮 */
#mini .form .btn,
#mini .form input[type="submit"] {
    width: 100%;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
    display: block;
    padding: 10px 0;
    font-size: 15px;
}

/* 忘记密码等链接居中 */
#mini .form a {
    display: inline-block;
}

/* 注册页表单同样处理 */
#mini #register-form {
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
}

/* ===================================================================
 * 侧边栏「续费 / 购买套餐」高亮
 * -------------------------------------------------------------------
 * 这一项是引导用户消费的入口，用粉色突出，比其它菜单项醒目。
 * 实现：给该菜单项的 linkOptions 加 class="mc-menu-hot"，
 *       这里只针对这个类做样式，不影响其它菜单项。
 * =================================================================== */
#sidebar ul.operations > li > a.mc-menu-hot,
#sidebar ul.operations > li > span > a.mc-menu-hot {
    background: linear-gradient(135deg, #fff0f6, #ffe4ef);
    color: #e8367f !important;
    font-weight: 700;
    border: 1px solid #ffc9de;
}

#sidebar ul.operations > li > a.mc-menu-hot:hover,
#sidebar ul.operations > li > a.mc-menu-hot:focus {
    background: linear-gradient(135deg, #ffe0ec, #ffd0e2);
    color: #d81b60 !important;
    border-color: #ff9ec4;
    box-shadow: 0 3px 12px rgba(232, 54, 127, .22);
}

/* 图标同色 */
#sidebar ul.operations > li > a.mc-menu-hot .mc-menu-icon,
#sidebar ul.operations > li > a.mc-menu-hot > i,
#sidebar ul.operations > li > a.mc-menu-hot > .fa {
    color: #e8367f !important;
}

/* 左侧加一条更粗的竖条，进一步强化 */
#sidebar ul.operations > li > a.mc-menu-hot::before {
    content: "";
    position: absolute;
    left: 0;
    top: 20%;
    bottom: 20%;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: #e8367f;
}
#sidebar ul.operations > li > a.mc-menu-hot {
    position: relative;
}

/* ---- 顶部导航里的粉色项 ---- */
#navbar .navbar-nav > li > a.mc-menu-hot {
    color: #e8367f !important;
    font-weight: 700;
    background: linear-gradient(135deg, #fff0f6, #ffe4ef) !important;
    border-radius: 8px;
    /* 左右留 8px，底框不要贴到相邻菜单项 */
    margin: 6px 8px;
    padding: 8px 16px !important;
    position: relative;
    /* 粉底本身已够醒目，扔掉原来那条下划线 */
    box-shadow: inset 0 0 0 1px #ffd6e6;
}
#navbar .navbar-nav > li > a.mc-menu-hot:hover,
#navbar .navbar-nav > li > a.mc-menu-hot:focus {
    color: #d81b60 !important;
    background: linear-gradient(135deg, #ffe0ec, #ffd0e2) !important;
    box-shadow: 0 3px 12px rgba(232, 54, 127, .22);
}
/* 粉色项的图标与下划线也用粉色 */
#navbar .navbar-nav > li > a.mc-menu-hot .mc-nav-icon,
#navbar .navbar-nav > li > a.mc-menu-hot svg {
    color: #e8367f !important;
    fill: #e8367f !important;
}
#navbar .navbar-nav > li > a.mc-menu-hot::after {
    display: none !important;      /* 粉底替代下划线，避免与底框重叠显得脏 */
}

/* ===================================================================
 * 粉色项与相邻菜单项的间距
 * -------------------------------------------------------------------
 * 粉底两侧是圆角，如果相邻项还是原来的 18px 内边距，
 * 底色边和文字会显得挤在一起。
 * 这里把粉色项左右的内边距收一点、相邻项之间留出视觉间隔。
 * =================================================================== */
#navbar .navbar-nav > li > a.mc-menu-hot + * ,
#navbar .navbar-nav > li:has(> a.mc-menu-hot) {
    margin-left: 4px;
    margin-right: 4px;
}

/* 粉色项本身：文字与底框留足内边距 */
#navbar .navbar-nav > li > a.mc-menu-hot {
    padding-left: 18px !important;
    padding-right: 18px !important;
    line-height: 1.5;
}

/* 窄屏下收窄，免得整体溢出 */
@media (max-width: 1100px) {
    #navbar .navbar-nav > li > a.mc-menu-hot {
        margin: 6px 4px;
        padding-left: 12px !important;
        padding-right: 12px !important;
    }
}

/* ===================================================================
 * 粉色菜单项：彻底移除底部下划线
 * -------------------------------------------------------------------
 * 问题：这个文件里 ::after（底部蓝色下划线）被重复定义了 7 次，
 *       最后一条会覆盖前面所有规则，导致粉色项下面残留一截蓝条，
 *       在圆角底框旁边看着像「两条竖杠」。
 *
 * 解决：用足够具体的选择器 + !important 一次性关掉，放在文件最后，
 *       确保它是最后生效的那条。
 * =================================================================== */
#navbar .navbar-nav > li > a.mc-menu-hot::after,
#navbar .navbar-nav > li > a.mc-menu-hot::before,
#navbar .navbar-nav > li.active > a.mc-menu-hot::after {
    content: none !important;
    display: none !important;
    background: none !important;
    height: 0 !important;
    border: none !important;
    box-shadow: none !important;
}

/* 粉色项的上下内边距跟普通项对齐，避免圆角框被拉得过高 */
#navbar .navbar-nav > li > a.mc-menu-hot {
    padding-top: 12px !important;
    padding-bottom: 15px !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

/* ===================================================================
 * 粉色项：彻底干掉下划线（终极方案）
 * -------------------------------------------------------------------
 * 前面已试过 content:none / display:none，但这条下划线由
 * 第 242 行的基础规则提供 content，后面的规则只改定位，
 * 所以必须同时把「内容」和「尺寸」都清零，而且要在文件最末。
 *
 * 这里给 ::after 一个 0 尺寸 + 透明背景，无论前面怎么定义都不可见。
 * =================================================================== */
#navbar .navbar-nav > li > a.mc-menu-hot::after {
    content: "" !important;
    display: block !important;
    width: 0 !important;
    height: 0 !important;
    min-width: 0 !important;
    min-height: 0 !important;
    max-width: 0 !important;
    max-height: 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    transform: none !important;
    left: 50% !important;
    right: auto !important;
    bottom: 50% !important;
    opacity: 0 !important;
    visibility: hidden !important;
}

/* ---- 粉色项与相邻项的间距 ---- */
/* 粉色项左右各留出足够空隙，不贴着邻居 */
#navbar .navbar-nav > li > a.mc-menu-hot {
    margin-left: 10px !important;
    margin-right: 10px !important;
}

/* 挨着粉色项的普通菜单项，多留一点内边距，视觉上拉开距离 */
#navbar .navbar-nav > li > a:not(.mc-menu-hot) {
    padding-left: 16px !important;
    padding-right: 16px !important;
}

/* ===================================================================
 * 粉色项与相邻菜单项的间距（最终版）
 * -------------------------------------------------------------------
 * 之前只给了 margin，但相邻项的内边距仍是 22px，
 * 视觉上「整合包广场」的粉框和「服务器」还是挨得近。
 * 这里给粉色项两侧留出 14px，明确分开。
 * =================================================================== */
#navbar .navbar-nav > li > a.mc-menu-hot {
    margin-left: 14px !important;
    margin-right: 14px !important;
}

/* 紧邻粉色项之后的普通项，左侧再多留一点 */
#navbar .navbar-nav > li:has(+ li > a.mc-menu-hot) > a:not(.mc-menu-hot) {
    padding-right: 22px !important;
}
#navbar .navbar-nav > li:has(> a.mc-menu-hot) + li > a:not(.mc-menu-hot) {
    padding-left: 22px !important;
}

/* ===================================================================
 * 顶部导航：统一菜单项间距
 * -------------------------------------------------------------------
 * 现象：「整合包广场」（粉框）和「服务器」（蓝框）贴在一起，
 *       两个圆角框的边几乎重合，看着像连成一块。
 *
 * 原因：菜单项的 <li> 之间没有间距，
 *       之前只给粉色项加了 margin，但只在一侧起作用。
 *
 * 做法：给所有 li 统一留出左右间距，圆角框之间自然分开。
 *       这样不管哪项被选中、哪项是粉色，间距都一致。
 * =================================================================== */
#navbar .navbar-nav {
    gap: 14px;                     /* flex 布局下最省事的方式 */
}

/* gap 已经负责间距，项自身的 margin 全部清零 */
#navbar .navbar-nav > li > a,
#navbar .navbar-nav > li > a.mc-menu-hot {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* 之前那条用 :has 的补丁不再需要，取消掉以免叠加出更大间距 */
#navbar .navbar-nav > li:has(+ li > a.mc-menu-hot) > a:not(.mc-menu-hot) {
    padding-right: 18px !important;
}
#navbar .navbar-nav > li:has(> a.mc-menu-hot) + li > a:not(.mc-menu-hot) {
    padding-left: 18px !important;
}

/* 窄屏下缩小间距，避免菜单溢出 */
@media (max-width: 1100px) {
    #navbar .navbar-nav { gap: 8px; }
}

/* ===================================================================
 * 顶部导航间距加大（第二次调整）
 * -------------------------------------------------------------------
 * 14px 在高分屏下仍显得近，加到 26px。
 * 同时给圆角框自身留出内边距，避免文字顶到边框。
 * =================================================================== */
#navbar .navbar-nav {
    gap: 26px !important;
}

/* 粉色项与选中项的框稍微内缩，视觉上更透气 */
#navbar .navbar-nav > li > a.mc-menu-hot,
#navbar .navbar-nav > li.active > a,
#navbar .navbar-nav > li > a.active {
    padding-left: 20px !important;
    padding-right: 20px !important;
}

@media (max-width: 1100px) {
    #navbar .navbar-nav { gap: 14px !important; }
}

/* ===================================================================
 * 服务器列表：节点标签
 * -------------------------------------------------------------------
 * 在服务器名后面显示一个小标签，标明它在哪个节点上。
 * 这样一眼就能看出服务器分布，不用逐个点进去看。
 * =================================================================== */
.mc-node-tag {
    display: inline-block;
    margin-left: 8px;
    padding: 1px 8px;
    font-size: 11.5px;
    font-weight: 500;
    line-height: 1.7;
    color: #4a7ba7;
    background: #eef5fc;
    border: 1px solid #d3e5f5;
    border-radius: 6px;
    vertical-align: middle;
    white-space: nowrap;
    cursor: help;
}

/* 默认隐藏，鼠标移到服务器行时才显示（避免列表太花） */
.server-list .mc-node-tag {
    opacity: 0;
    transition: opacity .15s;
}
.server-list:hover .mc-node-tag {
    opacity: 1;
}

/* 窄屏下直接显示（没有 hover 概念） */
@media (max-width: 768px) {
    .server-list .mc-node-tag { opacity: 1; }
}

/* ===================================================================
 * 服务器列表：节点分组标题
 * -------------------------------------------------------------------
 * 一个节点一个分区，分区标题显示节点名、ID、服务器数量，
 * 以及节点是否可达（小圆点：绿=在线，红=不可达）。
 * =================================================================== */
.mc-node-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 22px 0 8px;
    padding: 8px 14px;
    background: linear-gradient(90deg, #f4faff 0%, #fbfdff 100%);
    border-left: 3px solid #2cb2ff;
    border-radius: 0 8px 8px 0;
    font-size: 13.5px;
}

/* 第一个分组不要上边距 */
.mc-node-group:first-child,
.server-list + .mc-node-group:first-of-type {
    margin-top: 4px;
}

.mc-node-group-name {
    font-weight: 700;
    color: #22313f;
    font-size: 14.5px;
}

.mc-node-group-id {
    font-size: 11.5px;
    color: #98a9bb;
    background: #eef4fa;
    padding: 1px 7px;
    border-radius: 5px;
}

.mc-node-group-cnt {
    margin-left: auto;
    font-size: 12px;
    color: #7b90a6;
}

/* 节点可达状态圆点 */
.mc-node-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex: 0 0 auto;
}
.mc-node-dot.on {
    background: #34c759;
    box-shadow: 0 0 0 3px rgba(52, 199, 89, .18);
}
.mc-node-dot.off {
    background: #ff3b30;
    box-shadow: 0 0 0 3px rgba(255, 59, 48, .18);
}

/* 分组内的服务器行稍微缩进，视觉上归属更清楚 */
.mc-node-group + .server-list {
    margin-left: 4px;
}

/* ===================================================================
 * 服务器列表：搜索框
 * -------------------------------------------------------------------
 * 放在列表上方，和分页信息同一行区域。
 * 输入即筛选（服务器名 / 端口 / 目录 / 节点名）。
 * =================================================================== */
.mc-svsearch {
    margin: 0 0 12px;
}
.mc-svsearch-box {
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 480px;
    background: #fff;
    border: 1px solid #d7e6f3;
    border-radius: 10px;
    padding: 3px 4px 3px 12px;
    transition: border-color .15s, box-shadow .15s;
}
.mc-svsearch-box:focus-within {
    border-color: #2cb2ff;
    box-shadow: 0 0 0 3px rgba(44, 178, 255, .12);
}
.mc-svsearch-icon {
    font-size: 13px;
    opacity: .55;
    flex: 0 0 auto;
}
.mc-svsearch-input {
    flex: 1 1 auto;
    border: none !important;
    outline: none !important;
    background: transparent !important;
    font-size: 13.5px;
    color: #33475c;
    padding: 8px 0 !important;
    box-shadow: none !important;
    min-width: 0;
}
.mc-svsearch-input::placeholder { color: #a8b8c8; }

.mc-svsearch-clear {
    flex: 0 0 auto;
    width: 22px; height: 22px;
    line-height: 20px;
    text-align: center;
    border-radius: 50%;
    color: #98a9bb;
    text-decoration: none !important;
    font-size: 16px;
    transition: background .15s, color .15s;
}
.mc-svsearch-clear:hover {
    background: #eef4fa;
    color: #e8367f;
}

.mc-svsearch-btn {
    flex: 0 0 auto;
    padding: 7px 18px;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    background: linear-gradient(135deg, #1f8fe8, #2cb2ff);
    transition: filter .15s;
}
.mc-svsearch-btn:hover { filter: brightness(1.06); }

.mc-svsearch-hint {
    margin-top: 8px;
    font-size: 12.5px;
    color: #7b90a6;
}

/* 窄屏下搜索框占满 */
@media (max-width: 600px) {
    .mc-svsearch-box { max-width: none; }
}

/* ===================================================================
 * 服务器列表：分组折叠
 * -------------------------------------------------------------------
 * 点分组标题收起/展开该组的服务器。
 * 折叠状态存 localStorage，刷新后保持。
 * =================================================================== */
.mc-node-group {
    cursor: pointer;
    user-select: none;
    transition: background .15s;
}
.mc-node-group:hover {
    background: linear-gradient(90deg, #e8f4ff 0%, #f6fbff 100%);
}

/* 折叠箭头：展开时朝下，收起时朝右 */
.mc-node-arrow {
    flex: 0 0 auto;
    width: 14px;
    font-size: 11px;
    color: #7b90a6;
    transition: transform .18s;
    transform: rotate(0deg);
    line-height: 1;
}
.mc-node-group.collapsed .mc-node-arrow {
    transform: rotate(-90deg);
}

/* 收起时标题淡一点，提示里面有内容被折叠了 */
.mc-node-group.collapsed {
    opacity: .72;
}
.mc-node-group.collapsed:hover {
    opacity: 1;
}

/* 收起时数量文字改成「已收起」的感觉 */
.mc-node-group.collapsed .mc-node-group-cnt::after {
    content: " · 已收起";
    color: #a8b8c8;
}

/* 键盘聚焦时的可见焦点 */
.mc-node-group:focus {
    outline: 2px solid #2cb2ff;
    outline-offset: 2px;
}

/* ===================================================================
 * 服务器列表：搜索框与分页信息同行
 * -------------------------------------------------------------------
 * CListView 输出的结构：
 *   .list-view
 *       .mc-svsearch--inline   ← header，搜索框
 *       .summary               ← 「第 1-6 条，共 6 条」
 *       .sorter                ← 「排序: 名称」
 *       .items                 ← 服务器列表
 *
 * 做法：list-view 相对定位，搜索框绝对定位到左上角；
 *       summary / sorter 靠右，两者自然在同一水平线上。
 * =================================================================== */
.list-view {
    position: relative;
}

.list-view > .mc-svsearch--inline {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
    /* 够宽，让占位提示「搜索服务器名 / 端口 / 目录 / 节点名」完整显示 */
    width: 620px;
    max-width: calc(100% - 260px);   /* 给右侧分页信息留位置 */
}

/* 宽屏再放宽一点 */
@media (min-width: 1400px) {
    .list-view > .mc-svsearch--inline {
        width: 700px;
        max-width: calc(100% - 260px);
    }
}

/* 中等屏幕收窄，避免和分页信息重叠 */
@media (max-width: 1200px) {
    .list-view > .mc-svsearch--inline {
        width: 480px;
        max-width: calc(100% - 240px);
    }
}

.list-view > .summary,
.list-view > .sorter {
    text-align: right;
    margin-left: auto;
}

.list-view > .summary {
    min-height: 28px;
    padding-top: 5px;
}

.list-view > .sorter {
    min-height: 24px;
    margin-bottom: 6px;
}

.list-view > .items {
    clear: both;
}

.list-view > .mc-svsearch--inline .mc-svsearch-hint {
    margin-top: 6px;
    font-size: 12.5px;
}

/* 搜索框本体铺满容器（外层已控制宽度） */
.list-view > .mc-svsearch--inline .mc-svsearch-box {
    max-width: none;
    width: 100%;
}

@media (max-width: 768px) {
    .list-view > .mc-svsearch--inline {
        position: static;
        width: auto;
        max-width: none;
        margin-bottom: 10px;
    }
    .list-view > .mc-svsearch--inline .mc-svsearch-box {
        max-width: none;
    }
    .list-view > .summary,
    .list-view > .sorter {
        text-align: left;
    }
}

/* ===================================================================
 * 移动端适配（手机主题 miaoyou-手机）
 * -------------------------------------------------------------------
 * 手机版和 PC 版共用这份样式，但手机上要额外处理：
 *   · 侧边栏改成顶部横向滚动条（不占竖向空间）
 *   · 表格改成卡片式（横屏也放得下）
 *   · 点击目标加大到 44px（触控友好）
 *   · 字号和间距重新调，避免密密麻麻
 *
 * 判断依据：屏幕宽度 + 是否存在手机主题特有的标记。
 * 这里统一按屏幕宽度处理，PC 浏览器缩窄时也适用。
 * =================================================================== */

/* ---------- 触控友好的基础设置 ---------- */
@media (max-width: 991px) {

    /* 所有可点元素至少 44px 高（iOS 人机指南推荐值） */
    a.btn,
    button,
    input[type="submit"],
    .btn {
        min-height: 40px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    /* 输入框加大，手指点得准 */
    input[type="text"],
    input[type="password"],
    input[type="email"],
    input[type="number"],
    select,
    textarea,
    .form-control {
        min-height: 42px;
        font-size: 16px !important;   /* 小于 16px 时 iOS 会自动放大页面 */
        padding: 8px 12px;
    }

    /* 表格：改成横向滚动，避免挤压变形 */
    table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* 表单里的 label 单独一行 */
    .form-group label,
    label {
        display: block;
        margin-bottom: 4px;
    }

    /* 按钮组竖排，避免挤在一行 */
    .mc-btn-row {
        flex-direction: column;
        gap: 8px;
    }
    .mc-btn-row > * {
        width: 100%;
    }
}

/* ---------- 窄屏：单列布局 ---------- */
@media (max-width: 767px) {

    /* 内容区左右内边距收窄，多留出可用宽度 */
    #content,
    .col-toppad {
        padding-left: 8px !important;
        padding-right: 8px !important;
    }

    /* 卡片式表格：每行独立成块 */
    .mc-tbl thead {
        display: none;              /* 手机上表头没意义 */
    }
    .mc-tbl,
    .mc-tbl tbody,
    .mc-tbl tr,
    .mc-tbl td {
        display: block;
        width: 100% !important;
    }
    .mc-tbl tr {
        margin-bottom: 10px;
        border: 1px solid #e2edf8;
        border-radius: 10px;
        background: #fff;
        padding: 8px 10px;
    }
    .mc-tbl td {
        border: none !important;
        padding: 4px 0 !important;
        display: flex;
        justify-content: space-between;
        gap: 10px;
    }
    .mc-tbl td::before {
        content: attr(data-label);
        color: #8794a5;
        font-size: 12px;
        flex: 0 0 auto;
    }

    /* 套餐卡片单列 */
    .mc-price-grid {
        grid-template-columns: 1fr !important;
        gap: 14px !important;
    }

    /* 服务器分组标题在手机上更紧凑 */
    .mc-node-group {
        padding: 10px 12px;
        font-size: 13px;
    }
    .mc-node-group-name { font-size: 14px; }
    .mc-node-group-cnt { font-size: 11.5px; }

    /* 搜索框在手机上占满 */
    .mc-svsearch {
        max-width: none !important;
        margin-bottom: 10px;
    }

    /* 服务器列表行高加大，好点 */
    .server-list {
        padding: 10px 0;
        min-height: 52px;
    }
}

/* ---------- 超窄屏 ---------- */
@media (max-width: 480px) {

    /* 字号再收一点，避免换行太厉害 */
    body {
        font-size: 14px;
    }

    /* 标题缩小 */
    h1 { font-size: 20px; }
    h2 { font-size: 18px; }
    h3 { font-size: 16px; }

    /* 订单/套餐卡片内边距收窄 */
    .mc-price-card,
    .mc-card {
        padding: 16px 14px !important;
    }

    /* 价格数字别太大 */
    .mc-price-amount .num {
        font-size: 28px !important;
    }

    /* 按钮全宽 */
    .mc-price-buy {
        font-size: 14px !important;
        padding: 11px 0 !important;
    }

    /* 顶部导航项缩小，能多放几个 */
    #navbar .navbar-nav > li > a {
        font-size: 13.5px !important;
        padding: 12px 10px !important;
    }

    /* 搜索框和分页信息都占满 */
    .list-view > .summary,
    .list-view > .sorter {
        text-align: left !important;
    }
}

/* ---------- 竖屏/横屏切换 ---------- */
@media (max-width: 991px) and (orientation: landscape) {
    /* 横屏时高度紧张，压缩顶部区域 */
    #navbar .navbar-nav > li > a {
        padding-top: 10px !important;
        padding-bottom: 10px !important;
    }
    .mc-node-group {
        margin: 12px 0 6px;
    }
}

/* ---------- 触屏设备的 hover 处理 ---------- */
/* 触屏没有真正的 hover，避免点完后样式卡住 */
@media (hover: none) {
    .mc-node-group:hover {
        background: none;
    }
    .mc-node-group:active {
        background: #e8f4ff;
    }
    /* 节点标签在触屏上直接显示（没有 hover 可触发） */
    .server-list .mc-node-tag {
        opacity: 1 !important;
    }
}

/* ===================================================================
 * FTP 文件列表：让行菜单完整显示
 * -------------------------------------------------------------------
 * 问题：
 *   列表里只有一个文件时，表格只有一行高，
 *   行右侧「⋮」弹出的菜单超出表格范围，被外层容器的 overflow 裁掉，
 *   只能看到第一项。
 *
 * 处理：
 *   只放开容器的裁剪，其余交给 Bootstrap 自己处理
 *   （这个主题用的是 Bootstrap 3，菜单定位是它自己算的，
 *     我们不要用 CSS 去改 position，否则菜单会跑到屏幕外）。
 * =================================================================== */

#ftp-table-container,
#ftp-table,
#ftp-table tbody,
#ftp-table tr,
#ftp-table td {
    overflow: visible !important;
}

/* 给列表一个最小高度，让菜单有向下展开的空间 */
#ftp-table-container {
    min-height: 240px;
}

/* ===================================================================
 * 服务器资源卡片
 * -------------------------------------------------------------------
 * 原来是几个进度条堆在一起，没有层次。
 * 改成卡片网格：CPU / 内存 / 硬盘 / 带宽 各占一格。
 * =================================================================== */

.mc-res-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    margin: 0 0 18px;
}

.mc-res-card {
    background: #fff;
    border: 1px solid #e6eef8;
    border-radius: 12px;
    padding: 16px 18px 14px;
    box-shadow: 0 2px 10px rgba(16, 42, 67, .05);
    transition: box-shadow .18s, transform .18s, border-color .18s;
}

.mc-res-card:hover {
    box-shadow: 0 6px 22px rgba(44, 178, 255, .13);
    border-color: #d3e6f8;
    transform: translateY(-1px);
}

/* ---- 卡片头：图标 + 名称 ---- */
.mc-res-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
}

.mc-res-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 8px;
    flex: 0 0 26px;
}

.mc-res-icon-cpu  { background: #e8f4ff; color: #2cb2ff; }
.mc-res-icon-mem  { background: #eaf7ef; color: #34a853; }
.mc-res-icon-disk { background: #fff6e5; color: #f5a623; }
.mc-res-icon-net  { background: #f0ebff; color: #7c5cff; }

.mc-res-name {
    font-size: 13.5px;
    font-weight: 600;
    color: #48627d;
    flex: 1;
}

/* 右侧小标签（如带宽上限） */
.mc-res-tag {
    font-size: 11.5px;
    font-weight: 600;
    color: #7c5cff;
    background: #f4f0ff;
    border-radius: 20px;
    padding: 2px 9px;
}

/* ---- 数值 ---- */
.mc-res-value {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-bottom: 10px;
    min-height: 30px;
}

.mc-res-num {
    font-size: 20px;
    font-weight: 700;
    color: #22313f;
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
}

.mc-res-num.off {
    color: #b6c3d1;
    font-size: 17px;
}

.mc-res-max {
    font-size: 12.5px;
    color: #9bb0c4;
}

/* ---- 进度条 ---- */
.mc-res-bar {
    height: 7px;
    border-radius: 4px;
    background: #eef4fa;
    overflow: hidden;
}

.mc-res-fill {
    height: 100%;
    border-radius: 4px;
    transition: width .5s ease;
    min-width: 0;
}

.mc-fill-cpu  { background: linear-gradient(90deg, #6cc7ff, #2cb2ff); }
.mc-fill-mem  { background: linear-gradient(90deg, #6ddc9a, #34a853); }
.mc-fill-disk { background: linear-gradient(90deg, #ffd27a, #f5a623); }

.mc-res-foot {
    margin-top: 7px;
    font-size: 11.5px;
    color: #a8bdd2;
    text-align: right;
}

/* ---- 带宽卡片的两行明细 ---- */
.mc-res-net-rows {
    /* 上下行并排两列 —— 卡片更紧凑，一眼同时看到两个方向 */
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 4px;
}

.mc-res-net-row {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
    font-size: 11.5px;
    color: #8b9bb0;
    padding: 7px 11px;
    background: #fafcfe;
    border: 1px solid #eef4fa;
    border-radius: 8px;
    min-width: 0;
}

.mc-res-net-row b {
    /* 数值单独一行，字号大一点更醒目 */
    font-size: 14px;
    color: #3d5470;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}


/* ---- 窄屏：两列 → 一列 ---- */
@media (max-width: 768px) {
    .mc-res-grid {
        grid-template-columns: 1fr;
    }
}

/* ===================================================================
 * 服务器概览卡片（详情页顶部）
 * -------------------------------------------------------------------
 * 放在详情表格上方，一眼看到联机地址、状态、配额、到期时间。
 * =================================================================== */

.mc-ov-grid {
    display: grid;
    /* 四列：7 张卡片排成 4 + 3，联机地址占两格 */
    grid-template-columns: repeat(4, 1fr);
    gap: 13px;
    margin: 0 0 18px;
}

/* 联机地址占两格 */
.mc-ov-wide {
    grid-column: span 2;
}

/* 概览卡片和资源卡片统一外观 */
.mc-ov-card,
.mc-res-card {
    background: #fff;
    border: 1px solid #e6eef8;
    border-radius: 12px;
    padding: 14px 16px 15px;
    box-shadow: 0 2px 10px rgba(16, 42, 67, .05);
    transition: box-shadow .18s, transform .18s, border-color .18s;
    min-height: 128px;
    display: flex;
    flex-direction: column;
}

.mc-ov-card:hover,
.mc-res-card:hover {
    box-shadow: 0 6px 22px rgba(44, 178, 255, .13);
    border-color: #d3e6f8;
    transform: translateY(-1px);
}

/* 资源卡片的底部说明贴底 */
.mc-res-foot {
    margin-top: auto;
}

/* 概览卡片底部说明 */
.mc-ov-foot {
    margin-top: auto;
    padding-top: 6px;
    font-size: 11.5px;
    color: #a8bdd2;
    text-align: right;
}

.mc-ov-card {
    background: #fff;
    border: 1px solid #e6eef8;
    border-radius: 12px;
    padding: 14px 16px 15px;
    box-shadow: 0 2px 10px rgba(16, 42, 67, .05);
    transition: box-shadow .18s, transform .18s, border-color .18s;
}

.mc-ov-card:hover {
    box-shadow: 0 6px 22px rgba(44, 178, 255, .13);
    border-color: #d3e6f8;
    transform: translateY(-1px);
}

.mc-ov-head {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 11px;
}

.mc-ov-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 7px;
    flex: 0 0 24px;
}

.mc-ov-icon-addr  { background: #e8f4ff; color: #2cb2ff; }
.mc-ov-icon-state { background: #eaf7ef; color: #34a853; }
.mc-ov-icon-mem   { background: #eaf7ef; color: #34a853; }
.mc-ov-icon-disk  { background: #fff6e5; color: #f5a623; }
.mc-ov-icon-net   { background: #f0ebff; color: #7c5cff; }
.mc-ov-icon-exp   { background: #ffeef4; color: #e8367f; }

.mc-ov-name {
    font-size: 12.5px;
    font-weight: 600;
    color: #7b8ba1;
    letter-spacing: .2px;
}

/* ---- 数值 ---- */
.mc-ov-value {
    font-size: 20px;
    font-weight: 700;
    color: #22313f;
    line-height: 1.25;
    font-variant-numeric: tabular-nums;
}

.mc-ov-value small {
    font-size: 12px;
    font-weight: 500;
    color: #9bb0c4;
    margin-left: 4px;
}

.mc-ov-value.warn {
    color: #e8367f;
}

/* ---- 联机地址 ---- */
.mc-ov-addr {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.mc-ov-addr code {
    font-family: Consolas, Monaco, monospace;
    font-size: 17px;
    font-weight: 600;
    color: #22313f;
    background: #f6fafe;
    border: 1px solid #e2edf8;
    border-radius: 8px;
    padding: 6px 13px;
    letter-spacing: .4px;
    user-select: all;
}

.mc-ov-copy {
    border: 1px solid #cfe0f0;
    background: #fff;
    color: #48627d;
    border-radius: 8px;
    padding: 6px 14px;
    font-size: 12.5px;
    cursor: pointer;
    transition: all .15s;
    white-space: nowrap;
}

.mc-ov-copy:hover {
    border-color: #9ed3f7;
    color: #1f8fe8;
    background: #f2f9ff;
}

.mc-ov-copy.ok {
    border-color: #8fd6a8;
    color: #34a853;
    background: #f1fbf4;
}

/* ---- 运行状态 ---- */
#mc-ov-state.on  { color: #34a853; }
#mc-ov-state.off { color: #b6c3d1; }

/* ---- 窄屏 ---- */
@media (max-width: 1100px) {
    .mc-ov-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 820px) {
    .mc-ov-grid { grid-template-columns: repeat(2, 1fr); }
    .mc-ov-wide { grid-column: span 2; }
}

@media (max-width: 560px) {
    .mc-ov-grid { grid-template-columns: 1fr; }
    .mc-ov-wide { grid-column: span 1; }
    .mc-ov-addr code { font-size: 14px; }
    .mc-ov-value { font-size: 17px; }
}

/* ===================================================================
 * 整合包资源库入口卡片
 * -------------------------------------------------------------------
 * 原来是一个孤立的蓝色链接，跟页面其他部分风格不搭。
 * 改成卡片：图标 + 说明 + 按钮，与下面的概览卡片统一。
 * =================================================================== */

.mc-lib-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: linear-gradient(135deg, #f2f9ff, #e9f4ff);
    border: 1px solid #d6e9fa;
    border-radius: 12px;
    padding: 14px 18px;
    margin: 0 0 16px;
    box-shadow: 0 2px 10px rgba(44, 178, 255, .08);
    transition: box-shadow .18s, border-color .18s;
}

.mc-lib-card:hover {
    box-shadow: 0 6px 22px rgba(44, 178, 255, .16);
    border-color: #b9dbf7;
}

/* 图标 */
.mc-lib-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 11px;
    background: linear-gradient(135deg, #6cc7ff, #2cb2ff);
    color: #fff;
    flex: 0 0 40px;
    box-shadow: 0 3px 10px rgba(44, 178, 255, .28);
}

.mc-lib-text {
    flex: 1;
    min-width: 0;
}

.mc-lib-title {
    font-size: 14.5px;
    font-weight: 700;
    color: #22313f;
    margin-bottom: 2px;
}

.mc-lib-desc {
    font-size: 12.5px;
    color: #7b8ba1;
    line-height: 1.5;
}

/* 按钮 */
.mc-lib-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 9px;
    background: #fff;
    border: 1px solid #b9dbf7;
    color: #1f8fe8;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: all .16s;
    flex: 0 0 auto;
}

.mc-lib-btn:hover {
    background: #2cb2ff;
    border-color: #2cb2ff;
    color: #fff;
    box-shadow: 0 4px 14px rgba(44, 178, 255, .32);
    transform: translateY(-1px);
    text-decoration: none;
}

/* 窄屏：按钮换到下一行 */
@media (max-width: 600px) {
    .mc-lib-card {
        flex-wrap: wrap;
        gap: 10px;
    }

    .mc-lib-btn {
        width: 100%;
        justify-content: center;
    }
}

/* 磁盘使用卡片 */
.mc-ov-icon-usage { background: #e8f4ff; color: #2cb2ff; }

.mc-ov-foot {
    margin-top: 6px;
    font-size: 11.5px;
    color: #a8bdd2;
    text-align: right;
}

/* 进度条快满时变红 */
.mc-fill-danger {
    background: linear-gradient(90deg, #ff8a8a, #e53e3e) !important;
}

/* ===================================================================
   累计流量行（网速卡片底部）
   -------------------------------------------------------------------
   显示容器启动至今的总收发量，与上面的实时速率区分开：
     · 上面两行是「当前速度」（每秒）
     · 这一行是「累计总量」（从启动算起）
   =================================================================== */
.mc-res-net-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 7px;
    padding-top: 7px;
    border-top: 1px dashed #e4eef8;
    font-size: 11.5px;
}

.mc-res-net-total-label {
    color: #9aabc0;
    letter-spacing: .3px;
}

.mc-res-net-total-val {
    display: flex;
    gap: 10px;
    align-items: center;
}

.mc-res-net-total-val b {
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    font-size: 11.5px;
    white-space: nowrap;
}

/* 下行走蓝，上行走绿 —— 与常见的流量图配色一致 */
.mc-net-dl { color: #3b82c4; }
.mc-net-ul { color: #2e9e6b; }

/* 窄屏时缩小字号，避免换行 */
@media (max-width: 480px) {
    .mc-res-net-total-val b { font-size: 11px; }
    .mc-res-net-total-val { gap: 8px; }
}

/* 窄屏时上下行仍保持并排，只是缩小内边距 */
@media (max-width: 420px) {
    .mc-res-net-row {
        padding: 6px 8px;
    }
    .mc-res-net-row b {
        font-size: 13px;
    }
}

/* ===================================================================
 * 顶部导航：右侧「账号 / 管理」组
 * -------------------------------------------------------------------
 * 为什么这么排：
 *   菜单项平铺一行，数量一多就换行，
 *   换行后「设置 / 注销」孤零零落在第二行左边，看着像没排好。
 *
 *   改成后台面板的通用布局：
 *     左侧 —— 用户功能（首页 / 套餐 / 整合包 / 服务器 / 工单）
 *     右侧 —— 账号与管理（用户 / 公告管理 / 设置 / 注销）
 *   中间用 margin-left:auto 自动留白。
 *   换行时也是「左边一坨 + 右边一坨」，不会再出现孤儿项。
 * =================================================================== */
#navbar .navbar-nav > li.mc-nav-right {
    /* 把这一项及其后面的所有项推到最右 */
    margin-left: auto;
    position: relative;
    padding-left: 10px;
}

/* 右侧组前的竖直分隔线 */
#navbar .navbar-nav > li.mc-nav-right::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 20px;
    background: #e4eef8;
}

/* 右侧组第一项如果本身就是粉色高亮，分隔线就不需要了 */
#navbar .navbar-nav > li.mc-nav-right:has(> a.mc-menu-hot)::before {
    display: none;
}

/* ===================================================================
 * 视觉统一：让粉色高亮项与普通项的高度、圆角节奏一致
 * -------------------------------------------------------------------
 * 原来粉色项 margin 6px + padding 8px，普通项 padding 12px，
 * 两行高度差了 4px 左右，一排看过去高低不齐。
 * =================================================================== */
#navbar .navbar-nav > li > a.mc-menu-hot {
    margin: 5px 5px;
    padding: 9px 13px !important;
    border-radius: 9px;
    /* 让粉色块的视觉高度和普通项一致 */
    align-self: center;
}

/* 粉色块之间不要叠得太挤 */
#navbar .navbar-nav > li:has(> a.mc-menu-hot) + li:has(> a.mc-menu-hot) {
    margin-left: 0;
}

/* ===================================================================
 * 悬停：普通项也改成圆角底，和粉色块的语言保持一致
 * =================================================================== */
#navbar .navbar-nav > li:not(:has(> a.mc-menu-hot)) > a {
    border-radius: 9px;
    margin: 5px 1px;
}

/* 底部指示条跟着圆角底走 */
#navbar .navbar-nav > li:not(:has(> a.mc-menu-hot)) > a:not(.mc-menu-hot)::after {
    left: 10px;
    right: 10px;
    bottom: 4px;
}

/* 中等宽度下同步收窄 */
@media (min-width: 768px) and (max-width: 1200px) {
    #navbar .navbar-nav > li:not(:has(> a.mc-menu-hot)) > a:not(.mc-menu-hot)::after {
        left: 9px;
        right: 9px;
    }
    #navbar .navbar-nav > li > a.mc-menu-hot {
        padding: 8px 11px !important;
    }
}

/* 移动端：右侧组不靠右（竖排时靠右会显得突兀），分隔线改成横线 */
@media (max-width: 767px) {
    #navbar .navbar-nav > li.mc-nav-right {
        margin-left: 0;
        padding-left: 0;
    }
    #navbar .navbar-nav > li.mc-nav-right::before {
        left: 10px;
        right: 10px;
        top: 0;
        width: auto;
        height: 1px;
        transform: none;
        background: #eef4fa;
    }
    #navbar .navbar-nav > li:not(:has(> a.mc-menu-hot)) > a {
        margin: 2px 0;
    }
}

/* ===================================================================
 * 顶部导航 —— 最终统一版（覆盖本文件前面所有历史定义）
 * -------------------------------------------------------------------
 * 为什么放在文件最末尾：
 *   这个文件里的 navbar 样式被反复调整过 7 次（第 221 / 1143 / 1193 /
 *   1291 / 1421 / 1737 / 1779 行），同优先级下【最后一条生效】。
 *   前面几轮改的是早期那几块，全被后面的盖掉了 ——
 *   实测计算后的值一直是 padding:16px / gap:26px / font:14.5px。
 *
 *   与其去翻找哪一条在生效，不如在末尾写一块权威定义，
 *   用同样的选择器 + !important，靠「更靠后」稳赢。
 *
 * 目标：
 *   ① 允许换行，菜单项多了也不会「消失」
 *   ② 间距压到最小，10 个菜单项能在 1260px 一行放下
 *   ③ 左组导航 / 右组账号，中间自动留白
 * =================================================================== */

/* ---- 容器：允许换行 + 项间距压到 4px ---- */
#navbar .navbar-nav {
    flex-wrap: wrap !important;
    gap: 4px !important;
    row-gap: 2px !important;
    overflow: visible !important;
}

/* ---- 菜单项：统一内边距、字号、图标间距 ---- */
#navbar .navbar-nav > li > a {
    padding: 12px 10px !important;
    font-size: 13px !important;
    gap: 5px !important;
    margin: 0 !important;
    border-radius: 9px;
    line-height: 1.45;
}

/* ---- 粉色高亮项 / 当前项：内缩一致，不额外撑宽 ---- */
#navbar .navbar-nav > li > a.mc-menu-hot,
#navbar .navbar-nav > li.active > a,
#navbar .navbar-nav > li > a.active {
    padding-left: 12px !important;
    padding-right: 12px !important;
    margin: 5px 3px !important;
    border-radius: 9px;
}

/* ---- 底部指示条：跟着新的内边距走 ---- */
#navbar .navbar-nav > li > a:not(.mc-menu-hot)::after {
    left: 10px !important;
    right: 10px !important;
    bottom: 4px !important;
}

/* ===================================================================
 * 右侧「账号 / 管理」组：靠右对齐 + 竖直分隔线
 * -------------------------------------------------------------------
 * 左组 —— 用户功能：首页 / 官方QQ群 / 套餐 / 整合包 / 服务器 / 工单
 * 右组 —— 账号管理：用户 / 公告管理 / 设置 / 注销
 * 中间 margin-left:auto 自动留白，换行时也是整组一起走。
 * =================================================================== */
#navbar .navbar-nav > li.mc-nav-right {
    margin-left: auto !important;
    position: relative;
    padding-left: 8px;
}
#navbar .navbar-nav > li.mc-nav-right::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 20px;
    background: #e4eef8;
}

/* ---- 中等宽度：再收紧一点，尽量一到两行 ---- */
@media (min-width: 768px) and (max-width: 1200px) {
    #navbar .navbar-nav { gap: 2px !important; }
    #navbar .navbar-nav > li > a {
        padding: 11px 8px !important;
        font-size: 12.5px !important;
        gap: 4px !important;
    }
    #navbar .navbar-nav > li > a:not(.mc-menu-hot)::after {
        left: 8px !important;
        right: 8px !important;
    }
}

/* ---- 手机：竖排、全部展开（不受 Bootstrap 的 340px 折叠限制）---- */
@media (max-width: 767px) {
    #navbar .navbar-nav {
        display: block !important;
        gap: 0 !important;
        padding: 8px 0 !important;
    }
    #navbar .navbar-nav > li > a {
        padding: 11px 12px !important;
        justify-content: flex-start;
    }
    #navbar .navbar-nav > li > a.mc-menu-hot {
        margin: 5px 8px !important;
    }
    #navbar .navbar-collapse {
        max-height: none !important;
        overflow-y: visible !important;
        border-top: 1px solid #e8f1fa;
        margin-top: 6px;
    }
    /* 竖排时右组不需要靠右，分隔线改成横线 */
    #navbar .navbar-nav > li.mc-nav-right {
        margin-left: 0 !important;
        padding-left: 0;
    }
    #navbar .navbar-nav > li.mc-nav-right::before {
        left: 12px;
        right: 12px;
        top: 0;
        width: auto;
        height: 1px;
        transform: none;
    }
}

/* ===================================================================
 * 顶部导航菜单项 —— 最终强制值（最高优先级）
 * -------------------------------------------------------------------
 * 上面已经把 4 条重复规则的值都改成了 12px/10px，
 * 但浏览器计算出来仍是 16px —— 说明还有某条规则在内联样式表或
 * 媒体查询里以更高优先级压着（CSSOM 扫描只覆盖顶层规则，查不到）。
 *
 * 这里用「html + id + 类」的选择器（多一个元素级），
 * 优先级高于任何 #navbar ... 形式，稳赢。
 * =================================================================== */
html #navbar .navbar-nav > li > a {
    padding: 12px 10px !important;
    font-size: 13px !important;
    gap: 5px !important;
    margin: 0 !important;
    border-radius: 9px !important;
}
html #navbar .navbar-nav > li > a.mc-menu-hot,
html #navbar .navbar-nav > li.active > a,
html #navbar .navbar-nav > li > a.active {
    padding-left: 12px !important;
    padding-right: 12px !important;
}
html #navbar .navbar-nav {
    gap: 4px !important;
    flex-wrap: wrap !important;
}

/* ------------------------------------------------------------------
   续费实例按钮（联机地址卡片右侧空位）
   ------------------------------------------------------------------
   .mc-ov-addr 是 flex 容器，靠 margin-left:auto 把按钮顶到最右边，
   正好填掉地址和复制按钮之后的那块空白。
   ------------------------------------------------------------------ */
.mc-ov-renew {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 600;
    text-decoration: none !important;
    white-space: nowrap;
    color: #fff !important;
    background: linear-gradient(135deg, #1f8fe8, #2cb2ff);
    box-shadow: 0 3px 10px rgba(44, 178, 255, .30);
    transition: box-shadow .15s, transform .15s;
}
.mc-ov-renew:hover {
    box-shadow: 0 6px 16px rgba(44, 178, 255, .46);
    transform: translateY(-1px);
}
.mc-ov-renew svg { flex: 0 0 auto; }

/* 窄屏：不要顶到最右，跟复制按钮一起换行即可 */
@media (max-width: 560px) {
    .mc-ov-renew { margin-left: 0; width: 100%; justify-content: center; }
}

/* ==================================================================
   服务器页菜单：二级目录（可折叠分组）
   ------------------------------------------------------------------
   CMenu 的嵌套输出结构：

     <ul class="operations">
       <li><a>主页</a></li>                     ← 常驻项
       <li>
         <span>服务器管理</span>                 ← 组标题（无链接）
         <ul><li><a>控制台</a></li>…</ul>        ← 组内项
       </li>
     </ul>

   分组前是 24 项一路平铺，要滚很久；
   现在默认只显示组标题，点开才展开，进页面时当前页所在的组自动展开。
   ================================================================== */

/* ---- 组标题 ---- */
#sidebar ul.operations > li > span {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 12px;
    border-radius: 8px;
    color: #46617c;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
    transition: background .14s, color .14s;
    position: relative;
}
#sidebar ul.operations > li > span:hover { background: #eef7ff; color: #1f8fe8; }
#sidebar ul.operations > li > span .mc-menu-icon { flex: 0 0 auto; width: 16px; height: 16px; color: #7fa4c4; }

/* 右侧箭头，展开时旋转 */
#sidebar ul.operations > li > span::after {
    content: '';
    margin-left: auto;
    width: 6px; height: 6px;
    border-right: 1.6px solid #a8c2d8;
    border-bottom: 1.6px solid #a8c2d8;
    transform: rotate(-45deg);
    transition: transform .18s;
}
#sidebar ul.operations > li.is-open > span::after { transform: rotate(45deg); }
#sidebar ul.operations > li.is-open > span { background: #f2f9ff; color: #1f8fe8; }

/* ---- 组内项：默认收起 ---- */
/* 缩进要比组标题的文字起点（约 37px）明显更靠右，才看得出是下一级 */
#sidebar ul.operations > li > ul {
    display: none;
    margin: 2px 0 4px 34px;
    padding: 4px 0 4px 14px;
    border-left: 2px solid #dbe9f6;
    background: #fafdff;
    border-radius: 0 8px 8px 0;
}
#sidebar ul.operations > li.is-open > ul { display: block; }

/* 组内项：字号与颜色都再收一档，跟组标题拉开层次 */
#sidebar ul.operations > li > ul > li > a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 7px;
    color: #6b859c;
    font-size: 12.5px;
    line-height: 1.4;
    text-decoration: none;
    transition: background .14s, color .14s, transform .14s;
}
#sidebar ul.operations > li > ul > li > a:hover {
    background: #eef7ff;
    color: #1f8fe8;
    text-decoration: none;
    transform: translateX(2px);
}
#sidebar ul.operations > li > ul > li > a .mc-menu-icon { flex: 0 0 auto; width: 14px; height: 14px; color: #a3bfd6; }
#sidebar ul.operations > li > ul > li > a:hover .mc-menu-icon { color: #2cb2ff; }

/* 组内当前项 */
#sidebar ul.operations > li > ul > li.active > a {
    background: #e6f4ff;
    color: #1f8fe8;
    font-weight: 600;
}

/* 有子项展开时，父组的间距稍收一点 */
#sidebar ul.operations > li.is-open { margin-bottom: 6px; }

/* ------------------------------------------------------------------
   到期时间卡片里的套餐名
   ------------------------------------------------------------------
   放在到期日下方，字号小一档、颜色淡一档，
   和上面的大字日期形成主次关系。
   没配套餐时是灰色提示 + 一个「去设置」链接（仅超管可见）。
   ------------------------------------------------------------------ */
.mc-ov-plan {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 7px;
    padding-top: 7px;
    border-top: 1px dashed #eaf2fa;
    font-size: 12.5px;
    color: #48627d;
}
.mc-ov-plan-dot {
    flex: 0 0 auto;
    width: 6px; height: 6px;
    border-radius: 50%;
    background: #2cb2ff;
}
.mc-ov-plan.is-none { color: #a8bdd2; }
.mc-ov-plan-set {
    margin-left: auto;
    font-size: 12px;
    color: #1f8fe8 !important;
    text-decoration: none !important;
}
.mc-ov-plan-set:hover { text-decoration: underline !important; }

/* ------------------------------------------------------------------
   运行状态卡片：PID 单独一行
   ------------------------------------------------------------------
   原来 PID 跟在状态文字后面，卡片窄时会折行把「PID:」和数字拆开。
   现在独立成行，小字灰色，没有 PID 时整行隐藏（不留空行）。
   ------------------------------------------------------------------ */
.mc-ov-pid {
    margin-top: 5px;
    font-size: 11.5px;
    color: #a8bdd2;
    font-family: Consolas, Monaco, monospace;
    letter-spacing: .3px;
}

/* ==================================================================
   服务器管理 → 高级搜索面板
   ------------------------------------------------------------------
   原来是 16 个 .form-group 一路竖排，而全局样式给了
       .form-group { margin-bottom: 20px }
   一个字段就要占 60 多像素，16 个叠起来把页面拉得老长。

   改成响应式网格：
     宽屏 4 列 · 中屏 3 列 · 平板 2 列 · 手机 1 列
   16 个字段从「16 行」压到「4 行」，展开后不再占满整屏。
   ================================================================== */
#mc-sa-searchform {
    margin-bottom: 18px;
}
#mc-sa-searchform .wide.form {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px 16px;
    padding: 16px 18px;
    background: #fafcff;
    border: 1px solid #e8f1fa;
    border-radius: 12px;
}

/* 网格里不需要 .form-group 的 20px 下边距了，靠 gap 控制 */
#mc-sa-searchform .form-group {
    margin-bottom: 0;
    min-width: 0;            /* 防止长内容把格子撑破 */
}

#mc-sa-searchform .form-group label {
    display: block;
    margin-bottom: 4px;
    font-size: 12px;
    font-weight: 600;
    color: #7d93aa;
}

#mc-sa-searchform .form-group input[type="text"],
#mc-sa-searchform .form-group input[type="number"],
#mc-sa-searchform .form-group select {
    width: 100%;
    box-sizing: border-box;
    padding: 7px 10px;
    font-size: 12.5px;
    border: 1px solid #dbe8f4;
    border-radius: 8px;
    background: #fff;
    color: #22313f;
    transition: border-color .15s, box-shadow .15s;
}
#mc-sa-searchform .form-group input:focus,
#mc-sa-searchform .form-group select:focus {
    outline: none;
    border-color: #2cb2ff;
    box-shadow: 0 0 0 3px rgba(44, 178, 255, .13);
}

/* 提交按钮独占整行、靠右 */
#mc-sa-searchform .form-group.buttons {
    grid-column: 1 / -1;
    text-align: right;
    margin-top: 4px;
    padding-top: 12px;
    border-top: 1px dashed #e8f1fa;
}
#mc-sa-searchform .form-group.buttons input {
    padding: 8px 26px;
    border: none;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    background: linear-gradient(135deg, #1f8fe8, #2cb2ff);
    box-shadow: 0 3px 10px rgba(44, 178, 255, .30);
}
#mc-sa-searchform .form-group.buttons input:hover {
    box-shadow: 0 6px 16px rgba(44, 178, 255, .46);
}

/* 中屏 3 列 */
@media (max-width: 1200px) {
    #mc-sa-searchform .wide.form { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
/* 平板 2 列 */
@media (max-width: 900px) {
    #mc-sa-searchform .wide.form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* 手机 1 列 */
@media (max-width: 560px) {
    #mc-sa-searchform .wide.form { grid-template-columns: 1fr; gap: 10px; padding: 13px 14px; }
}

/* ==================================================================
   修改在线人数：卡片上的按钮 + 弹窗
   ================================================================== */
.mc-ov-edit {
    margin-left: auto;                 /* 顶到卡片标题行最右 */
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 11px;
    border-radius: 7px;
    font-size: 11.5px;
    font-family: inherit;
    cursor: pointer;
    background: #f2f9ff;
    color: #1d6fd0;
    border: 1px solid #cfe4fa;
    transition: background .15s, border-color .15s, color .15s;
    white-space: nowrap;
}
.mc-ov-edit:hover { background: #dcecff; border-color: #9ed3f7; color: #1f8fe8; }
.mc-ov-edit svg { flex: 0 0 auto; }

/* ---- 弹窗 ---- */
.mc-sp-mask {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 100000;
    background: rgba(20, 40, 60, .38);
    backdrop-filter: blur(2px);
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.mc-sp-mask.is-on { display: flex; }

.mc-sp-box {
    width: 100%;
    max-width: 380px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 18px 50px rgba(20, 60, 100, .28);
    overflow: hidden;
    animation: mc-sp-in .16s ease-out;
}
@keyframes mc-sp-in {
    from { opacity: 0; transform: translateY(-8px) scale(.98); }
    to   { opacity: 1; transform: none; }
}

.mc-sp-head {
    padding: 15px 18px;
    font-size: 14.5px;
    font-weight: 700;
    color: #22313f;
    border-bottom: 1px solid #eef4fa;
}
.mc-sp-body { padding: 16px 18px 4px; }
.mc-sp-body label {
    display: block;
    font-size: 12.5px;
    font-weight: 600;
    color: #7d93aa;
    margin-bottom: 6px;
}
.mc-sp-body input[type="number"] {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    font-size: 15px;
    font-weight: 600;
    color: #22313f;
    border: 1px solid #dbe8f4;
    border-radius: 9px;
    background: #fafcff;
}
.mc-sp-body input[type="number"]:focus {
    outline: none;
    border-color: #2cb2ff;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(44, 178, 255, .15);
}
.mc-sp-hint {
    margin-top: 9px;
    font-size: 12px;
    line-height: 1.7;
    color: #93a8bd;
}
.mc-sp-hint b { color: #c47a00; }
.mc-sp-err {
    min-height: 18px;
    margin-top: 4px;
    font-size: 12.5px;
    color: #c0392b;
}

.mc-sp-foot {
    display: flex;
    justify-content: flex-end;
    gap: 9px;
    padding: 14px 18px 16px;
}
.mc-sp-btn {
    padding: 9px 22px;
    border-radius: 9px;
    font-size: 13.5px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    background: #fff;
    color: #48627d;
    border: 1px solid #d7e6f3;
    transition: background .15s, border-color .15s;
}
.mc-sp-btn:hover { background: #f2f9ff; border-color: #9ed3f7; color: #1f8fe8; }
.mc-sp-btn.primary {
    border: none;
    color: #fff;
    font-weight: 600;
    background: linear-gradient(135deg, #1f8fe8, #2cb2ff);
    box-shadow: 0 3px 10px rgba(44, 178, 255, .32);
}
.mc-sp-btn.primary:hover { box-shadow: 0 6px 16px rgba(44, 178, 255, .46); color: #fff; }
.mc-sp-btn:disabled { opacity: .6; cursor: default; }

/* ------------------------------------------------------------------
   联机地址卡片：右上角名称 + 右下角操作
   ------------------------------------------------------------------ */
.mc-ov-title {
    margin-left: auto;                 /* 顶到标题行最右 */
    max-width: 52%;
    font-size: 15px;                   /* 加大一档，名称是这张卡片的主角 */
    font-weight: 700;
    color: #22313f;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 「修改名称」现在在地址那一行里，靠 margin-left:auto 顶到最右。
   （原来它独占卡片底部一行，卡片因此高出一截） */
.mc-ov-addr .mc-ov-edit { margin-left: auto; }

/* ------------------------------------------------------------------
   到期卡片里的「续费实例」小按钮
   ------------------------------------------------------------------
   跟套餐名同一行、靠右，比原来在地址卡片里那版小一号。
   ------------------------------------------------------------------ */
.mc-ov-renew-sm {
    margin-left: auto;                 /* 顶到套餐名那一行的最右 */
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 11px;
    border-radius: 7px;
    font-size: 11.5px;
    font-weight: 600;
    text-decoration: none !important;
    white-space: nowrap;
    color: #fff !important;
    background: linear-gradient(135deg, #1f8fe8, #2cb2ff);
    box-shadow: 0 3px 9px rgba(44, 178, 255, .28);
    transition: box-shadow .15s, transform .15s;
}
.mc-ov-renew-sm:hover {
    box-shadow: 0 5px 14px rgba(44, 178, 255, .45);
    transform: translateY(-1px);
}
.mc-ov-renew-sm svg { flex: 0 0 auto; }

/* ==================================================================
   改名弹窗里的颜色代码取色板
   ================================================================== */
.mc-sp-wide { max-width: 460px !important; }

.mc-cc-label {
    margin: 14px 0 7px;
    font-size: 12.5px;
    font-weight: 700;
    color: #46617c;
}
.mc-cc-label:first-child { margin-top: 0; }

/* 色块行 */
.mc-cc-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.mc-cc-chip {
    width: 30px;
    height: 30px;
    border-radius: 7px;
    border: 1px solid rgba(0, 0, 0, .14);
    cursor: pointer;
    padding: 0;
    transition: transform .12s, box-shadow .12s;
    position: relative;
}
.mc-cc-chip:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(20, 60, 100, .26);
}
.mc-cc-chip:active { transform: none; }
/* 让每个色块带一点"§"字符的暗示 */
.mc-cc-chip::after {
    content: '§';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 700;
    color: rgba(255, 255, 255, .78);
    text-shadow: 0 1px 2px rgba(0, 0, 0, .45);
    pointer-events: none;
}

/* 格式按钮 */
.mc-cc-fmt {
    padding: 7px 12px;
    border-radius: 8px;
    font-size: 12.5px;
    font-family: inherit;
    cursor: pointer;
    background: #f4f8fc;
    color: #48627d;
    border: 1px solid #dfeaf5;
    transition: background .13s, border-color .13s, color .13s;
    white-space: nowrap;
}
.mc-cc-fmt:hover {
    background: #e6f2fd;
    border-color: #9ed3f7;
    color: #1f8fe8;
}

.mc-cc-input-label {
    display: block;
    margin: 16px 0 6px !important;
    font-size: 12.5px !important;
    font-weight: 700 !important;
    color: #46617c !important;
}
.mc-cc-tip {
    margin-top: 7px;
    font-size: 11.5px;
    color: #a0b4c8;
    line-height: 1.6;
}

/* 预览框：默认浅底，跟面板一致；
   另配一个「深底对比」按钮，想看游戏内效果时切过去。
   浅底上白色文字（§f）几乎看不见，所以补一层极淡的文字阴影兜底。 */
.mc-cc-preview {
    min-height: 42px;
    display: flex;
    align-items: center;
    padding: 10px 13px;
    border-radius: 9px;
    background: #f5f8fc;
    border: 1px solid #e2edf8;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.5;
    color: #22313f;
    text-shadow: 0 0 1.5px rgba(0, 0, 0, .42);
    word-break: break-all;
    overflow-wrap: anywhere;
    transition: background .16s, border-color .16s;
}
/* 切到深底（模拟游戏内服务器列表） */
.mc-cc-preview.on-dark {
    background: #26262c;
    border-color: #35353d;
    text-shadow: none;
}
.mc-cc-ph { color: #a8bdd2; font-weight: 400; text-shadow: none; }
.mc-cc-preview.on-dark .mc-cc-ph { color: #61616b; }

/* 「深底对比」小按钮 */
.mc-cc-pt {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 7px;
}
.mc-cc-pt-btn {
    margin-left: auto;
    padding: 4px 11px;
    border-radius: 7px;
    font-size: 11.5px;
    font-family: inherit;
    cursor: pointer;
    background: #fff;
    color: #7d93aa;
    border: 1px solid #e2edf8;
    transition: background .13s, border-color .13s, color .13s;
}
.mc-cc-pt-btn:hover { background: #f2f9ff; border-color: #9ed3f7; color: #1f8fe8; }
.mc-cc-pt-btn.on { background: #f2f9ff; border-color: #9ed3f7; color: #1f8fe8; }

/* 窄屏：色块小一点 */
@media (max-width: 560px) {
    .mc-cc-chip { width: 26px; height: 26px; }
    .mc-cc-fmt { padding: 6px 9px; font-size: 12px; }
}

/* ==================================================================
   概览卡片：内容不再"上重下空"
   ------------------------------------------------------------------
   网格默认 align-items: stretch，一行里的卡片被拉成等高。
   矮卡片（联机地址）的内容就全挤在顶部，下面空一大块。

   做法：卡片改成 flex 列，标题行钉在顶部，
   其余内容作为一个整体在剩余空间里垂直居中 ——
   高卡片本来就占满，不受影响；矮卡片的内容会落到视觉重心上。
   ================================================================== */
.mc-ov-grid > .mc-ov-card {
    display: flex;
    flex-direction: column;
    /* 上下留白匀一点，原来 15px 让内容显得贴顶 */
    padding-top: 16px;
    padding-bottom: 16px;
}

/* 标题行固定在顶部 */
.mc-ov-grid > .mc-ov-card > .mc-ov-head { flex: 0 0 auto; }

/* 第一个内容块上留 auto、最后一个下留 auto ——
   两者配合把整块内容推到剩余空间的中间 */
.mc-ov-grid > .mc-ov-card > .mc-ov-head + * { margin-top: auto; }
.mc-ov-grid > .mc-ov-card > *:last-child { margin-bottom: auto; }

/* 地址卡片里那行（地址 + 复制 + 改名）本身也垂直居中 */
.mc-ov-addr { align-items: center; }

/* 窄屏单列时高度不再被拉长，取消居中避免出现怪异空隙 */
@media (max-width: 700px) {
    .mc-ov-grid > .mc-ov-card > .mc-ov-head + * { margin-top: 0; }
    .mc-ov-grid > .mc-ov-card > *:last-child { margin-bottom: 0; }
}

/* ------------------------------------------------------------------
   运行按钮的「处理中」态
   ------------------------------------------------------------------
   只加视觉变灰，【不设 disabled】——
   Yii 的按钮事件委托在 body 上，disabled 的表单控件不再派发 click，
   冒泡被掐断后 body 上的处理器收不到，表现就是「点了没反应」。
   ------------------------------------------------------------------ */
.mc-run-btn.is-busy {
    opacity: .55;
    cursor: progress !important;
    filter: grayscale(.35);
}

/* ==================================================================
   运行按钮的禁用态：改成明确的灰色
   ------------------------------------------------------------------
   原来只有 opacity: .45 —— 「开始」本来是绿色，半透明之后
   是个"淡淡的绿按钮"，用户看着还像能按的样子（虽然实际点不动）。

   这里用 !important 覆盖 console-modern.css 里的规则
   （那张表加载得更晚，同权重它会赢）。
   ================================================================== */
.mc-run-btn:disabled,
.mc-run-btn[disabled] {
    opacity: 1 !important;
    color: #b4c6d8 !important;
    background: #f5f8fb !important;
    border-color: #e4ecf4 !important;
    cursor: not-allowed !important;
    transform: none !important;
    box-shadow: none !important;
    filter: grayscale(1) !important;
}
/* 鼠标移上去也不给任何高亮反馈 */
.mc-run-btn:disabled:hover,
.mc-run-btn[disabled]:hover {
    background: #f5f8fb !important;
    border-color: #e4ecf4 !important;
    color: #b4c6d8 !important;
    transform: none !important;
    box-shadow: none !important;
}

/* ==================================================================
   严格进服开关（玩家列表页）
   ------------------------------------------------------------------
   开：server.default_level = 0，默认角色的玩家被 daemon 踢出；
   关：10（guest），默认角色也能进。
   ================================================================== */
.mc-jm-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 0 0 14px;
    padding: 13px 18px;
    background: #fff;
    border: 1px solid #e2edf7;
    border-left: 3px solid #b6dcf5;
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(16, 42, 67, .05);
    transition: border-color .18s, background .18s;
}
.mc-jm-card.is-on {
    border-left-color: #7ed8a8;
    background: #fbfefc;
}
.mc-jm-card.is-busy { opacity: .72; pointer-events: none; }

.mc-jm-left { display: flex; align-items: center; gap: 11px; min-width: 0; }
.mc-jm-icon {
    flex: none;
    width: 30px; height: 30px;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 15px;
    background: #f0f7fd;
    border-radius: 8px;
}
.mc-jm-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mc-jm-title { font-size: 13.5px; font-weight: 600; color: #2c4a63; }
.mc-jm-desc  { font-size: 11.5px; color: #7b91a6; line-height: 1.5; }
.mc-jm-desc b { color: #48627d; font-weight: 600; }

/* ---- 开关本体 ---- */
.mc-jm-switch {
    flex: none;
    display: inline-flex; align-items: center; gap: 9px;
    cursor: pointer;
    margin: 0;
    font-weight: normal;
}
.mc-jm-switch.is-disabled { cursor: not-allowed; opacity: .55; }
.mc-jm-switch input { position: absolute; opacity: 0; width: 0; height: 0; }

.mc-jm-slider {
    position: relative;
    display: inline-block;
    width: 42px; height: 23px;
    background: #cfdded;
    border-radius: 23px;
    transition: background .2s;
}
.mc-jm-slider::after {
    content: '';
    position: absolute;
    top: 2.5px; left: 2.5px;
    width: 18px; height: 18px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(16, 42, 67, .25);
    transition: transform .2s;
}
.mc-jm-switch input:checked + .mc-jm-slider { background: #57c98a; }
.mc-jm-switch input:checked + .mc-jm-slider::after { transform: translateX(19px); }
.mc-jm-switch input:focus + .mc-jm-slider { box-shadow: 0 0 0 3px rgba(87, 201, 138, .22); }

.mc-jm-state {
    font-size: 11.5px;
    font-weight: 600;
    color: #8fa6ba;
    min-width: 42px;
}
.mc-jm-switch input:checked ~ .mc-jm-state { color: #2f9e63; }

/* ===================================================================
 * 节点端口设置：用量进度条
 * -------------------------------------------------------------------
 * 让「端口段还剩多少」一眼能看出来。
 * =================================================================== */
.mc-port-usage {
    font-size: 12.5px;
    color: #5c7a99;
    font-variant-numeric: tabular-nums;
}
.mc-port-usage b { color: #22313f; font-size: 14px; }

.mc-port-bar {
    margin-top: 5px;
    height: 5px;
    border-radius: 4px;
    background: #eef4fa;
    overflow: hidden;
}
.mc-port-bar i {
    display: block;
    height: 100%;
    border-radius: 4px;
    background: linear-gradient(90deg, #2cb2ff, #1f8fe8);
    transition: width .2s;
}
.mc-port-bar.is-warn i { background: linear-gradient(90deg, #f0b429, #e08c1a); }
.mc-port-bar.is-full i { background: linear-gradient(90deg, #e74c3c, #c0392b); }

.mc-port-note {
    margin-top: 16px;
    padding: 12px 15px;
    border-radius: 10px;
    background: #fafcff;
    border: 1px solid #e8f1fa;
    font-size: 12.5px;
    line-height: 1.95;
    color: #6b8299;
}
.mc-port-note b { color: #3d5a75; }
.mc-port-note code {
    padding: 1px 5px;
    border-radius: 4px;
    background: #eef4fa;
    color: #1f8fe8;
    font-size: 11.5px;
}

/* ===================================================================
 * 改名弹窗 —— MOTD 强制应用开关
 * -------------------------------------------------------------------
 * 复用控制台那几个弹窗的配色（mc-sr-*），保持视觉一致。
 * =================================================================== */
.mc-sn-motd {
    margin: 14px 0 0;
    padding: 12px 13px;
    border: 1px solid #e4eef8;
    border-radius: 10px;
    background: #fafcff;
    transition: border-color .16s, background .16s;
}
.mc-sn-motd.is-on {
    border-color: #bfe3ff;
    background: #f4faff;
}

.mc-sn-motd-head {
    display: flex;
    align-items: center;
    gap: 8px;
}
.mc-sn-motd-title {
    font-size: 13px;
    font-weight: 700;
    color: #22313f;
}
.mc-sn-motd-state {
    padding: 1px 8px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    background: #eef4fa;
    color: #7d93aa;
}
.mc-sn-motd-state.on  { background: #eafaf1; color: #1f9254; }
.mc-sn-motd-state.off { background: #eef4fa; color: #7d93aa; }

/* 开关推到最右 */
.mc-sn-motd-sw { margin-left: auto; }

.mc-sn-motd-desc {
    margin-top: 7px;
    font-size: 11.5px;
    line-height: 1.75;
    color: #8fa6bb;
}
.mc-sn-motd-desc code {
    padding: 1px 5px;
    border-radius: 4px;
    background: #eef4fa;
    color: #5c7a99;
    font-size: 11px;
}

/* 描述输入框：和名称框同一套观感 */
#mc-sn-desc {
    width: 100%;
    box-sizing: border-box;
    padding: 9px 12px;
    border: 1px solid #dbe8f4;
    border-radius: 8px;
    background: #fff;
    font-size: 13px;
    font-family: inherit;
    color: #22313f;
}
#mc-sn-desc:focus {
    outline: none;
    border-color: #2cb2ff;
    box-shadow: 0 0 0 3px rgba(44,178,255,.13);
}

/* 预览里的换行 —— 用块级元素换行，不用 <br>，
   这样颜色 span 的样式不会被影响 */
.mc-cc-nl {
    display: block;
    height: 0;
    line-height: 0;
    font-size: 0;
}

/* 描述输入框和名称框的间距 */
#mc-sn-input + #mc-sn-desc,
.mc-cc-input-label + #mc-sn-desc {
    margin-top: 2px;
}
#mc-sn-desc {
    margin-bottom: 4px;
}

/* 预览的内层容器 ——
   .mc-cc-preview 是 flex，直接塞多个子元素它们会并排，
   display:block 也压不住（flex item 的 display 被改写）。
   套这一层后，换行就在普通块级上下文里生效了。 */
.mc-cc-pv-in {
    display: block;
    width: 100%;
    min-width: 0;
}

/* 套餐页的轻提示 —— 改套餐时告诉用户同步了哪些资源 */
#mc-ps-toast {
    position: fixed;
    left: 50%;
    bottom: 34px;
    transform: translateX(-50%) translateY(16px);
    z-index: 9998;
    max-width: 80vw;
    padding: 11px 20px;
    border-radius: 10px;
    background: rgba(34, 49, 63, .93);
    color: #fff;
    font-size: 13px;
    line-height: 1.6;
    box-shadow: 0 8px 26px rgba(0, 0, 0, .22);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s, transform .2s;
}
#mc-ps-toast.on {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* 计时卡徽标（常显，蓝底）——实例行一眼认出计时机器 */
.mc-node-tag-tc {
    color: #fff;
    background: linear-gradient(135deg,#1f8fe8,#2cb2ff);
    border-color: #1f8fe8;
}
.server-list .mc-node-tag-tc { opacity: 1; }