@charset "utf-8";
/* 前台自定义样式 */

body {
    background: #f5f6f7;
    color: #333;
}

/* 顶部栏 */
.navbar {
    height: 52px;
    line-height: 52px;
    background: #426374;
    color: #fff;
    padding: 0 20px;
    overflow: hidden;
}
.navbar-title {
    font-size: 18px;
    font-weight: bold;
}
.navbar-user {
    float: right;
    font-size: 13px;
}
.navbar-user .btn {
    margin-left: 8px;
}

/* 登录错误提示 */
.login-error {
    color: #d9534f;
    text-align: center;
    margin-top: 10px;
    font-size: 14px;
}

/* 面板 */
.panel {
    background: #fff;
    border: 1px solid #e3e8ec;
    border-radius: 4px;
    padding: 16px 18px;
    margin-bottom: 20px;
}
.panel-title {
    font-size: 16px;
    font-weight: bold;
    color: #426374;
    border-left: 4px solid #426374;
    padding-left: 8px;
    margin: 0 0 14px;
}

/* 表单内联 */
.form-inline .input-text {
    margin-right: 8px;
    margin-bottom: 6px;
}
.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }

/* 表格 */
.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.table th, .table td {
    border: 1px solid #dbe2e8;
    padding: 6px 8px;
    text-align: center;
    vertical-align: middle;
}
.table thead th {
    background: #eef3f7;
    color: #426374;
    font-weight: bold;
}
.text-center { text-align: center; }
.text-muted { color: #999; cursor: not-allowed; }

/* 获取链接图标 */
.link-icon {
    display: inline-block;
    color: #1e9fff;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
}
.link-icon:hover { text-decoration: underline; }

/* textarea */
.textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #dbe2e8;
    border-radius: 3px;
    padding: 8px;
    font-size: 13px;
    resize: vertical;
}

/* 提示消息 */
.alert {
    padding: 10px 14px;
    border-radius: 4px;
    margin-bottom: 14px;
    font-size: 13px;
}
.alert-success {
    background: #dff0d8;
    color: #3c763d;
    border: 1px solid #d6e9c6;
}
.alert-error {
    background: #f2dede;
    color: #a94442;
    border: 1px solid #ebccd1;
}

/* 轻提示 */
.toast {
    position: fixed;
    top: 70px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    padding: 8px 18px;
    border-radius: 4px;
    font-size: 13px;
    display: none;
    z-index: 9999;
}

/* 登录页顶部标题（仅新增文字，不改变原有 H-ui 主题样式） */
.login-title {
    position: absolute;
    top: 88px;
    left: 0;
    right: 0;
    text-align: center;
    color: #fff;
    font-size: 30px;
    font-weight: bold;
    letter-spacing: 6px;
    z-index: 2;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* 面板子标题 */
.sub-title {
    font-size: 14px;
    font-weight: bold;
    color: #426374;
    margin: 18px 0 10px;
    padding-left: 8px;
    border-left: 3px solid #426374;
}

/* 客户端下载列表 */
.client-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.client-list li {
    padding: 8px 0;
    border-bottom: 1px dashed #e3e8ec;
    font-size: 13px;
}
.client-list li:last-child { border-bottom: none; }
.client-name { color: #426374; }
.client-meta { margin-left: 8px; }

/* 错误页面 */
.errorWraper {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    background: #f5f6f7;
    display: table;
    width: 100%;
}
.errorBox {
    display: table-cell;
    vertical-align: middle;
    text-align: center;
    padding: 20px;
}
.error-code {
    font-size: 90px;
    font-weight: bold;
    color: #426374;
    line-height: 1;
}
.error-message {
    font-size: 18px;
    color: #666;
    margin: 20px 0 30px;
}
.error-actions .btn { margin: 0 6px; }

/* 合规提醒横幅（所有用户显著展示） */
.compliance-banner {
    display: flex;
    align-items: flex-start;
    background: #fff8e6;
    border: 1px solid #f6d27a;
    border-left: 5px solid #e6a23c;
    border-radius: 4px;
    padding: 12px 16px;
    margin-bottom: 20px;
}
.compliance-tag {
    flex: none;
    background: #e6a23c;
    color: #fff;
    font-size: 13px;
    font-weight: bold;
    padding: 2px 10px;
    border-radius: 3px;
    margin-right: 12px;
}
.compliance-text {
    color: #8a5a00;
    font-size: 14px;
    line-height: 1.7;
    white-space: pre-wrap;
    word-break: break-word;
}

/* 分页 */
.pagination {
    margin-top: 12px;
    text-align: right;
    font-size: 13px;
}
.pagination .page-link {
    display: inline-block;
    padding: 4px 12px;
    margin-left: 6px;
    border: 1px solid #dbe2e8;
    border-radius: 3px;
    color: #1e9fff;
    text-decoration: none;
    background: #fff;
}
.pagination .page-link:hover { background: #f2f8ff; }
.pagination .page-link.disabled {
    color: #bbb;
    cursor: not-allowed;
    background: #fafafa;
}
.pagination .page-info {
    margin: 0 4px 0 10px;
    color: #666;
}

/* 启用/保存行内编辑 */
.cell-recharge .edit-recharge {
    width: 90px;
}
.cell-disable-time .edit-disable { color: #426374; }

/* 操作手册列表 */
.manual-list li { border-bottom-style: solid; }

/* ============================================================
   移动端适配（Android / 鸿蒙 / iOS 等移动终端）
   全部在此覆盖第三方 H-ui 样式，不修改 H-ui 框架文件
   ============================================================ */

/* 通用兜底：防止字体自动放大、统一盒模型、避免横向抖动 */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
*, *::before, *::after { box-sizing: border-box; }
/* 注意：不要对 body 使用 overflow-x:hidden。
   微信 Android/鸿蒙（X5）内核在 body 同时存在横向裁剪与纵向内容时，
   会把页面纵向滚动一并锁死（表现为"页面无法下滑"，而手机系统浏览器正常）。
   改用 overflow-x:clip：不产生滚动容器，不影响纵向滚动；
   不支持的旧内核会忽略该声明，同样可正常滚动。 */
body { overflow-x: clip; }

/* 表格横向滚动容器（桌面端无副作用，窄屏可左右滑动查看全部列） */
.table-wrap { width: 100%; }

/* ---------- 平板 / 手机横屏（≤768px） ---------- */
@media (max-width: 768px) {

    /* ---- 登录页：固定居中框改为自适应卡片 ---- */
    .loginWraper {
        position: static;
        min-height: 100vh;
        padding: 76px 16px 64px;
        background-size: cover;
        background-position: center;
        box-sizing: border-box;
    }
    .header { position: static; }
    .footer { position: static; }

    /* 去掉 617x330 固定尺寸与负 margin 居中，改为流式卡片
       （#loginform 提高权重以覆盖 H-ui.login.css 的 .loginBox） */
    #loginform.loginBox {
        position: static;
        width: auto;
        max-width: 100%;
        height: auto;
        margin: 0 auto;
        padding: 22px 16px;
        background: rgba(255, 255, 255, 0.96);
        border-radius: 8px;
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
    }
    /* 覆盖 H-ui 的 .loginBox .input-text{width:360px} */
    #loginform .input-text { width: 100%; }
    #loginform .form-label { width: 14%; }
    #loginform .formControls { width: 86%; }

    /* 标题恢复文档流，避免与顶部 header 重叠 */
    .login-title {
        position: static;
        margin: 6px 0 18px;
        font-size: 24px;
        letter-spacing: 2px;
    }

    /* 清除验证码行/按钮行的栅格偏移（col-xs-offset-3 的 margin-left:25%） */
    #loginform .captcha-row .formControls,
    #loginform .login-actions .formControls {
        margin-left: 0;
        width: 100%;
    }

    /* 验证码：输入框占约 58%，图片自适应剩余空间
       （使用 #loginform 前缀以高于 #loginform .input-text 的权重） */
    #loginform .captcha-row .formControls {
        display: flex;
        align-items: center;
    }
    #loginform .captcha-row .input-text { width: 58%; }
    #loginform .captcha-row img { max-width: 40%; height: auto; }

    /* 登录按钮触控友好 */
    .login-actions .btn { min-height: 40px; }
    .login-error { font-size: 13px; }

    /* ---- 管理页 ---- */
    .navbar {
        height: auto;
        line-height: 1.6;
        padding: 10px 12px;
        overflow: visible;
    }
    .navbar-title { display: inline-block; font-size: 16px; }
    .navbar-user {
        float: none;
        display: block;
        margin-top: 6px;
        font-size: 13px;
    }
    .navbar-user .btn { margin-left: 0; }

    /* 容器与面板内边距收紧 */
    .container { width: auto; max-width: 100%; padding: 0 12px; }
    .panel { padding: 12px; }
    .panel-title { font-size: 15px; }

    /* 表格横向滚动，保证列不被压缩变形。
       注意：不要给容器添加旧内核的惯性滚动 hack（iOS 专属属性），
       该属性在 Android/鸿蒙的 X5 内核下会"吞掉"纵向手势，
       导致在表格区域拖动时页面无法上下滚动。 */
    .table-wrap {
        overflow-x: auto;
    }
    .table-wrap .table { min-width: 640px; }
    .table th, .table td { white-space: nowrap; padding: 8px 10px; }
    .table td .input-text { min-width: 110px; }
    .table td .textarea { min-width: 140px; }
    .cell-recharge .edit-recharge { width: 100px; }

    /* 内联表单在窄屏堆叠为整行 */
    .form-inline .input-text,
    .form-inline .textarea,
    .form-inline .btn {
        display: block;
        width: 100%;
        margin: 0 0 8px;
    }
    .form-inline .file-full { width: 100%; }

    /* 合规横幅允许换行 */
    .compliance-banner { flex-wrap: wrap; }
    .compliance-tag { margin-bottom: 6px; }

    /* 分页居中并增大点击区域 */
    .pagination { text-align: center; }
    .pagination .page-link { padding: 8px 14px; margin: 4px; }
    .pagination .page-info { display: block; margin-top: 6px; }

    /* 列表项行高放宽，便于触控 */
    .client-list li { line-height: 1.9; }
    .client-meta { display: inline-block; margin-left: 0; }
}

/* ---------- 手机竖屏（≤480px） ---------- */
@media (max-width: 480px) {

    .loginWraper { padding: 70px 12px 60px; }
    .login-title { font-size: 20px; }
    #loginform.loginBox { padding: 18px 12px; }
    #loginform .form-label { width: 12%; }
    #loginform .formControls { width: 88%; }
    .login-actions .btn { display: block; width: 100%; margin: 8px 0 0; }

    .panel { padding: 10px; }
    .panel-title { font-size: 15px; }
    .sub-title { font-size: 13px; }
    .table { font-size: 12px; }

    .error-code { font-size: 60px; }
    .error-message { font-size: 15px; }
}

/* ============================================================
   微信内置浏览器（MicroMessenger）兼容增强
   在移动端适配基础上叠加，不修改 H-ui 框架文件
   ============================================================ */

/* 触摸体验：去除点击高亮（不使用 touch-action，避免旧内核手势/滚动异常） */
a, button, input, textarea, select, .btn {
    -webkit-tap-highlight-color: transparent;
}

/* 安全区适配（刘海屏 / 全面屏） */
body {
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
}
.footer { padding-bottom: calc(12px + env(safe-area-inset-bottom)); }

/* 微信内允许长按选择文本（订阅链接等便于手动复制） */
.is-wechat .compliance-text,
.is-wechat .link-icon {
    -webkit-user-select: text;
    user-select: text;
}

@media (max-width: 768px) {
    /* 防止 iOS/微信 聚焦输入框时自动放大页面：输入类元素字号不小于 16px */
    input, textarea, select,
    .input-text, .textarea {
        font-size: 16px;
    }
    /* 订阅链接等长文本列允许换行，避免撑破表格 */
    .table-wrap .table td { white-space: normal; }
    .table-wrap .table th { white-space: nowrap; }
}

/* ---------- 微信内下载受限引导浮层 ---------- */
.wx-tip-mask {
    display: none;
    visibility: hidden;
    pointer-events: none;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.65);
    -webkit-tap-highlight-color: transparent;
}
.wx-tip-mask.is-open {
    display: block;
    visibility: visible;
    pointer-events: auto;
}
.wx-tip-card {
    position: absolute;
    top: 16px;
    right: 16px;
    left: 16px;
    max-width: 420px;
    margin: 0 auto;
    padding: 18px 16px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.28);
    text-align: left;
}
.wx-tip-arrow {
    color: #1e9fff;
    font-size: 22px;
    font-weight: 700;
    line-height: 1;
    text-align: right;
}
.wx-tip-arrow-label {
    font-size: 12px;
    font-weight: 400;
    color: #666;
    margin-left: 4px;
}
.wx-tip-title { margin: 10px 0 6px; font-size: 16px; font-weight: 700; color: #333; }
.wx-tip-text { margin: 0 0 14px; font-size: 14px; line-height: 1.7; color: #555; }
.wx-tip-actions { text-align: right; }
.wx-tip-actions .btn { margin-left: 8px; }
