/* ============================================================
 * 功能使用次数：购买页 / 记录页 / 个人中心额度模块 公共样式
 * 依赖 member frame 布局，PC 与移动端自适应
 * ============================================================ */

/* ---------- 页面通用 ---------- */
.quota-page {
    padding: 6px 2px 30px;
    color: #36485c;
}
.quota-page .qp-head {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    margin: 8px 0 4px;
}
.quota-page .qp-head h2 {
    font-size: 18px;
    margin: 0;
    font-weight: bold;
}
.quota-page .qp-head-links {
    margin-left: auto;
    font-size: 13px;
}
.quota-page .qp-head-links a {
    color: #ff6a00;
    margin-left: 14px;
}
.quota-page .qp-sub {
    color: #999;
    font-size: 13px;
    margin: 6px 0 2px;
}

/* ---------- 支付结果横幅 ---------- */
.qp-banner {
    display: none;
    margin: 12px 0 2px;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.6;
}
.qp-banner .qp-banner-title {
    font-weight: bold;
}
.qp-banner-info {
    background: #ecf5ff;
    color: #337ecc;
    border: 1px solid #b3d8ff;
}
.qp-banner-ok {
    background: #f0f9eb;
    color: #529b2e;
    border: 1px solid #e1f3d8;
}
.qp-banner-fail {
    background: #fef0f0;
    color: #c45656;
    border: 1px solid #fde2e2;
}

/* ---------- 功能选项卡 ---------- */
.qp-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 14px 0 4px;
}
.qp-tab {
    display: inline-flex;
    align-items: center;
    height: 34px;
    padding: 0 14px;
    border: 1px solid #e3e6eb;
    border-radius: 17px;
    background: #fff;
    color: #555;
    font-size: 14px;
    cursor: pointer;
    user-select: none;
}
.qp-tab .qp-badge {
    margin-left: 6px;
    min-width: 20px;
    height: 18px;
    line-height: 18px;
    padding: 0 6px;
    border-radius: 9px;
    background: #f0f2f5;
    color: #666;
    font-size: 12px;
    text-align: center;
}
.qp-tab.active {
    background: #ff6a00;
    border-color: #ff6a00;
    color: #fff;
}
.qp-tab.active .qp-badge {
    background: #fff;
    color: #ff6a00;
}
.qp-tab.zero .qp-badge {
    background: #f56c6c;
    color: #fff;
}
.qp-tab.active.zero .qp-badge {
    background: #fff;
    color: #f56c6c;
}

/* ---------- 额度状态条 ---------- */
.qp-quota {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 14px 16px;
    margin: 12px 0;
}
.qp-quota-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 26px;
    font-size: 13px;
    color: #666;
    line-height: 26px;
}
.qp-quota-row b {
    color: #36485c;
    font-size: 15px;
}
.qp-quota-row .qp-warn {
    color: #f56c6c;
}
.qp-quota-row .qp-ok {
    color: #529b2e;
}
.qp-progress {
    height: 6px;
    border-radius: 3px;
    background: #f0f2f5;
    overflow: hidden;
    margin-top: 10px;
}
.qp-progress i {
    display: block;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #ffa940, #ff6a00);
    border-radius: 3px;
}
.qp-progress.full i {
    background: #f56c6c;
}
.qp-quota-tip {
    font-size: 12px;
    color: #999;
    margin-top: 8px;
}

/* ---------- 套餐卡片 ---------- */
.qp-group-title {
    font-size: 15px;
    font-weight: bold;
    margin: 18px 0 10px;
}
.qp-packs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 14px;
}
.qp-pack {
    position: relative;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    padding: 22px 14px 16px;
    text-align: center;
    box-sizing: border-box;
}
.qp-pack-best {
    border-color: #ff6a00;
    box-shadow: 0 2px 10px rgba(255, 106, 0, 0.12);
}
.qp-tag-best {
    position: absolute;
    top: 0;
    right: 0;
    background: #ff6a00;
    color: #fff;
    font-size: 12px;
    line-height: 1;
    padding: 5px 10px;
    border-radius: 0 8px 0 10px;
}
.qp-pack-title {
    font-size: 14px;
    color: #36485c;
    margin-bottom: 8px;
    word-break: break-all;
}
.qp-pack-count {
    line-height: 1;
    margin-bottom: 10px;
}
.qp-pack-count b {
    font-size: 30px;
    color: #ff6a00;
}
.qp-pack-count span {
    font-size: 13px;
    color: #999;
    margin-left: 3px;
}
.qp-pack-price {
    font-size: 18px;
    color: #f56c6c;
    font-weight: bold;
}
.qp-pack-price del {
    font-size: 12px;
    color: #bbb;
    font-weight: normal;
    margin-left: 6px;
}
.qp-pack-unitprice {
    font-size: 12px;
    color: #999;
    margin: 4px 0 6px;
}
.qp-pack-desc {
    font-size: 12px;
    color: #888;
    min-height: 32px;
    line-height: 16px;
    margin-bottom: 10px;
}
.qp-buy {
    display: inline-block;
    width: 100%;
    max-width: 150px;
    height: 34px;
    line-height: 34px;
    text-align: center;
    border: none;
    border-radius: 17px;
    background: #ff6a00;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    padding: 0;
}
.qp-buy:hover {
    background: #e65e00;
}
.qp-buy[disabled] {
    background: #ccc;
    cursor: default;
}
.qp-empty {
    padding: 26px 0;
    text-align: center;
    color: #999;
    font-size: 13px;
    background: #fff;
    border: 1px dashed #e5e5e5;
    border-radius: 8px;
}

/* ---------- 购买说明 ---------- */
.qp-faq {
    margin-top: 24px;
}
.qp-faq h3 {
    font-size: 15px;
    font-weight: bold;
    margin: 0 0 10px;
}
.qp-faq ol {
    margin: 0;
    padding-left: 20px;
    color: #777;
    font-size: 13px;
    line-height: 26px;
}

/* ---------- 记录页 ---------- */
.qr-tabs {
    display: flex;
    gap: 22px;
    border-bottom: 1px solid #eee;
    margin: 10px 0 14px;
}
.qr-tab {
    padding: 8px 2px;
    font-size: 15px;
    color: #666;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    user-select: none;
}
.qr-tab.active {
    color: #ff6a00;
    font-weight: bold;
    border-bottom-color: #ff6a00;
}
.qr-filter {
    margin-bottom: 10px;
    font-size: 13px;
    color: #666;
}
.qr-filter select {
    height: 28px;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 0 6px;
    color: #333;
    background: #fff;
    margin-left: 6px;
}
.qr-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    font-size: 13px;
}
.qr-table th {
    background: #fafafa;
    color: #666;
    font-weight: normal;
    text-align: left;
}
.qr-table th, .qr-table td {
    padding: 10px 8px;
    border-bottom: 1px solid #f0f0f0;
    white-space: nowrap;
}
.qr-table .td-wrap {
    white-space: normal;
    min-width: 140px;
}
.qr-money {
    color: #f56c6c;
    font-weight: bold;
}
.qr-minus {
    color: #f56c6c;
}
.qr-plus {
    color: #529b2e;
}
.qr-tag {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 12px;
    line-height: 18px;
}
.qr-tag-pack {
    background: #f0f9eb;
    color: #529b2e;
}
.qr-tag-daily {
    background: #ecf5ff;
    color: #337ecc;
}
.qr-wait { background: #fdf6ec; color: #b88230; }
.qr-paid { background: #f0f9eb; color: #529b2e; }
.qr-closed { background: #f4f4f5; color: #888; }
.qr-cancel { background: #fef0f0; color: #c45656; }
.qr-empty {
    padding: 30px 0;
    text-align: center;
    color: #999;
    font-size: 13px;
}
.qr-pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-top: 14px;
    font-size: 13px;
    color: #666;
}
.qr-pager button {
    height: 28px;
    padding: 0 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    color: #555;
    cursor: pointer;
}
.qr-pager button[disabled] {
    color: #ccc;
    cursor: default;
}
.qr-loading {
    padding: 20px 0;
    text-align: center;
    color: #999;
    font-size: 13px;
}

/* ---------- 个人中心：使用次数管理 ---------- */
.qm-wrap {
    margin: 6px 0 0;
}
.qm-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 14px;
    padding: 12px 4px;
    border-bottom: 1px dashed #f0f0f0;
    font-size: 13px;
    color: #666;
}
.qm-row:last-child {
    border-bottom: none;
}
.qm-name {
    width: 78px;
    color: #36485c;
    font-weight: bold;
    flex-shrink: 0;
}
.qm-nums {
    flex: 1;
    min-width: 200px;
}
.qm-nums b {
    font-size: 15px;
}
.qm-nums .qm-left {
    color: #ff6a00;
}
.qm-nums .qm-zero {
    color: #f56c6c;
}
.qm-nums .qm-unlimited {
    color: #529b2e;
    font-weight: bold;
}
.qm-bar {
    display: inline-block;
    vertical-align: middle;
    width: 120px;
    height: 6px;
    border-radius: 3px;
    background: #f0f2f5;
    overflow: hidden;
    margin: 0 8px;
}
.qm-bar i {
    display: block;
    height: 100%;
    width: 0;
    background: #ffa940;
}
.qm-btns {
    flex-shrink: 0;
}
.qm-btn {
    display: inline-block;
    height: 26px;
    line-height: 26px;
    padding: 0 12px;
    border-radius: 13px;
    border: 1px solid #ff6a00;
    color: #ff6a00;
    font-size: 12px;
    margin-left: 8px;
    cursor: pointer;
}
.qm-btn.solid {
    background: #ff6a00;
    color: #fff;
}
.qm-head {
    display: flex;
    align-items: center;
}
.qm-head .mc-title {
    margin-bottom: 0;
}
.qm-head-links {
    margin-left: auto;
    font-size: 13px;
}
.qm-head-links a {
    color: #ff6a00;
    margin-left: 14px;
}

/* ---------- 移动端微调 ---------- */
@media (max-width: 768px) {
    .hide-mobile {
        display: none !important;
    }
}
body.m-root .hide-mobile {
    display: none !important;
}
body.m-root .qp-tab {
    height: 30px;
    padding: 0 11px;
    font-size: 13px;
}
body.m-root .qp-packs {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
}
body.m-root .qp-pack-count b {
    font-size: 24px;
}
body.m-root .qr-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
}
body.m-root .qm-nums {
    min-width: 0;
    width: 100%;
    order: 3;
}
body.m-root .qm-bar {
    display: none;
}

/* ---------- 题库 / 试卷入口页额度提示条 ---------- */
.qe-tip {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    margin-bottom: 12px;
    font-size: 13px;
    color: #4b5563;
    background: #f6f8fb;
    border: 1px solid #e5e9f0;
    border-radius: 8px;
}
.qe-tip .qe-icon {
    margin-right: 8px;
    color: #ff6a00;
}
.qe-tip b {
    color: #ff6a00;
    font-weight: 700;
    padding: 0 2px;
}
.qe-tip .qe-sep {
    margin: 0 8px;
    color: #d5dae2;
}
.qe-tip .qe-btn {
    margin-left: auto;
    padding: 5px 14px;
    font-size: 13px;
    color: #fff;
    background: #ff6a00;
    border-radius: 999px;
    text-decoration: none;
    white-space: nowrap;
}
.qe-tip.qe-danger {
    color: #c0392b;
    background: #fff3f2;
    border-color: #ffd6d2;
}
.qe-tip.qe-danger b {
    color: #c0392b;
}
.qe-tip.qe-ok {
    color: #1f7a45;
    background: #f2fbf5;
    border-color: #d8f0e1;
}
.qe-tip.qe-ok .qe-icon,
.qe-tip.qe-ok b {
    color: #1f7a45;
}
@media (max-width: 768px) {
    .qe-tip {
        display: block;
        line-height: 1.9;
    }
    .qe-tip .qe-btn {
        display: inline-block;
        margin: 6px 0 0;
    }
}

/* ---------- 次数用尽引导弹窗 ---------- */
.qm-mask {
    position: fixed;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.5);
    z-index: 20000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.qm-dialog {
    width: 340px;
    max-width: 100%;
    background: #fff;
    border-radius: 12px;
    padding: 26px 24px 20px;
    text-align: center;
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.25);
}
.qm-dialog-title {
    font-size: 17px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 10px;
}
.qm-dialog-text {
    font-size: 14px;
    color: #4b5563;
    line-height: 1.7;
    margin-bottom: 20px;
}
.qm-dialog-btns {
    display: flex;
    gap: 12px;
}
.qm-dialog-btn {
    flex: 1;
    display: inline-block;
    height: 38px;
    line-height: 38px;
    border-radius: 999px;
    font-size: 14px;
    text-decoration: none;
    color: #6b7280;
    background: #f3f4f6;
}
.qm-dialog-btn-primary {
    color: #fff;
    background: linear-gradient(90deg, #ff8a3c, #ff6a00);
}

/* ---------- MTiku 移动站浮动入口 / 额度面板 ---------- */
.mtq-fab {
    position: fixed;
    right: 14px;
    bottom: 96px;
    width: 46px;
    height: 46px;
    line-height: 46px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff8a3c, #ff6a00);
    color: #fff;
    font-size: 13px;
    text-align: center;
    box-shadow: 0 4px 14px rgba(255, 106, 0, 0.4);
    z-index: 19000;
    cursor: pointer;
    user-select: none;
}
.mtq-mask {
    position: fixed;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.4);
    z-index: 20000;
}
.mtq-panel {
    position: fixed;
    right: 12px;
    bottom: 150px;
    width: 286px;
    max-width: calc(100vw - 24px);
    max-height: 56vh;
    overflow-y: auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.25);
    z-index: 20001;
    padding: 14px 16px;
    box-sizing: border-box;
}
.mtq-panel-head {
    display: flex;
    align-items: center;
    font-size: 15px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 6px;
}
.mtq-close {
    margin-left: auto;
    font-size: 18px;
    line-height: 1;
    color: #9ca3af;
    cursor: pointer;
    padding: 0 4px;
}
.mtq-row {
    display: flex;
    align-items: center;
    padding: 9px 0;
    border-bottom: 1px dashed #f0f0f0;
    font-size: 13px;
}
.mtq-row:last-of-type {
    border-bottom: none;
}
.mtq-name {
    width: 72px;
    flex-shrink: 0;
    color: #36485c;
    font-weight: 600;
}
.mtq-val {
    flex: 1;
    color: #6b7280;
    line-height: 1.6;
}
.mtq-val b {
    color: #ff6a00;
}
.mtq-val .mtq-danger {
    color: #f56c6c;
    font-weight: 600;
}
.mtq-val .mtq-ok {
    color: #529b2e;
    font-weight: 600;
}
.mtq-loading {
    padding: 16px 0;
    text-align: center;
    color: #9ca3af;
    font-size: 13px;
}
.mtq-foot {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}
.mtq-foot a {
    flex: 1;
    display: inline-block;
    height: 34px;
    line-height: 34px;
    text-align: center;
    border-radius: 999px;
    font-size: 13px;
    text-decoration: none;
    color: #ff6a00;
    border: 1px solid #ff6a00;
    box-sizing: border-box;
}
.mtq-foot a.mtq-solid {
    background: linear-gradient(90deg, #ff8a3c, #ff6a00);
    color: #fff;
    border-color: transparent;
}
