/* ==========================================================
   04889dh · 个人中心「我的」样式
   ========================================================== */

/* ---------------- 用户卡 ---------------- */

.my-user {
    background: linear-gradient(135deg, #ef4a6b 0%, #CC0000 55%, #9d0000 100%);
    border-radius: var(--radius);
    box-shadow: 0 4px 14px rgba(204, 0, 0, .18);
    padding: 14px 12px 12px;
    color: #fff;
    margin-bottom: 10px;
}

.my-user.guest {
    background: #fff;
    color: var(--text);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.my-user-top {
    display: flex;
    align-items: center;
    gap: 10px;
}

.my-avatar {
    width: 52px;
    height: 52px;
    flex: 0 0 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    border: 2px solid rgba(255, 255, 255, .85);
    background: #333;
}

.my-user.guest .my-avatar {
    border-color: var(--line);
    background: #eee;
    color: var(--text-3);
}

.my-user-info {
    flex: 1;
    min-width: 0;
}

.my-name {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 17px;
    font-weight: 700;
}

.my-level {
    font-size: 10px;
    font-weight: 600;
    color: #7a4a00;
    background: linear-gradient(135deg, #ffe6b0, #ffc45c);
    border-radius: 4px;
    padding: 1px 5px;
}

.my-sub {
    font-size: 12px;
    opacity: .85;
    margin-top: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.my-user.guest .my-sub {
    opacity: 1;
    color: var(--text-3);
}

.my-user-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.my-btn {
    height: 32px;
    padding: 0 16px;
    border-radius: 16px;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.my-btn.primary {
    background: #fff;
    color: var(--red);
    font-weight: 600;
}

.my-btn.ghost {
    background: rgba(255, 255, 255, .18);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, .45);
}

.my-btn.outline {
    background: #fff;
    color: var(--text-2);
    border: 1px solid var(--line);
}

.my-btn.outline:hover {
    border-color: var(--red);
    color: var(--red);
}

.my-btn.primary:hover {
    background: #ffecec;
}

.my-btn.ghost:hover {
    background: rgba(255, 255, 255, .3);
}

.my-btn.small {
    height: 27px;
    padding: 0 12px;
    font-size: 12px;
    border-radius: 14px;
}

.my-btn:disabled {
    opacity: .6;
    cursor: not-allowed;
    transform: none;
}

.my-points {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, .25);
    font-size: 12px;
}

.my-user.guest .my-points {
    border-top-color: var(--line);
    color: var(--text-3);
}

.my-points b {
    font-size: 16px;
    margin-left: 3px;
}

.my-points .mp-sign {
    margin-left: auto;
}

/* ---------------- 数据概览 ---------------- */

/* 三格：账户余额 / 钱包充值 / 我的钱包 */
.my-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    margin-bottom: 10px;
}

.my-stat {
    padding: 12px 4px;
    text-align: center;
    border-right: 1px solid var(--line);
}

.my-stat:last-child {
    border-right: 0;
}

/* 充值入口（点击进入钱包充值页） */
.my-stat.my-stat-act {
    display: block;
    color: inherit;
    text-decoration: none;
    cursor: pointer;
}

/* 图标与数字格等高：b 统一为固定高度的居中盒子 */
.my-stat-act b svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: var(--red);
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.my-stat b {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 27px;
    font-size: 18px;
    color: var(--red);
    font-family: "DIN Alternate", Menlo, Consolas, monospace;
}

.my-stat span {
    font-size: 11px;
    color: var(--text-3);
}

/* ---------------- 功能宫格 ---------------- */

.my-menu {
    margin-bottom: 10px;
}

.my-menu-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding: 11px 12px 2px;
    font-size: 14px;
    font-weight: 700;
}

.my-menu-head em {
    font-style: normal;
    font-size: 11px;
    color: var(--text-3);
    font-weight: 400;
}

.my-menu-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px 0;
    padding: 8px 0 12px;
}

.my-menu-item {
    border: 0;
    background: none;
    padding: 6px 2px;
    text-align: center;
    position: relative;
}

.my-menu-ico {
    width: 38px;
    height: 38px;
    margin: 0 auto 5px;
    border-radius: 12px;
    background: var(--red-soft);
    color: var(--red);
    display: flex;
    align-items: center;
    justify-content: center;
}

.my-menu-ico svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.my-menu-item.active .my-menu-ico {
    background: var(--red);
    color: #fff;
}

.my-menu-item:hover .my-menu-ico {
    background: #ffe0e0;
}

.my-menu-item.active:hover .my-menu-ico {
    background: var(--red);
}

.my-menu-label {
    font-size: 12px;
    color: var(--text-2);
}

.my-menu-badge {
    position: absolute;
    top: 2px;
    left: 50%;
    margin-left: 6px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 8px;
    background: var(--red);
    color: #fff;
    font-size: 10px;
    line-height: 16px;
    font-weight: 700;
}

/* ---------------- 功能区详情 ---------------- */

.my-panel {
    margin-bottom: 14px;
}

.my-tabs {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 10px 10px 8px;
    scrollbar-width: none;
}

.my-tabs::-webkit-scrollbar {
    display: none;
}

.my-tabs button {
    flex: 0 0 auto;
    height: 28px;
    padding: 0 12px;
    border-radius: 14px;
    background: #f4f4f6;
    color: var(--text-2);
    font-size: 13px;
    white-space: nowrap;
}

.my-tabs button.active {
    background: var(--red-soft);
    color: var(--red);
    font-weight: 600;
}

.my-tabs button:hover {
    background: #ececf0;
}

.my-tabs button.active:hover {
    background: var(--red-soft);
    color: var(--red);
}

.my-tab-body {
    padding: 0 12px 14px;
}

.my-sec {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    padding: 12px 2px 7px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.my-sec em {
    font-style: normal;
    font-size: 11px;
    color: var(--text-3);
    font-weight: 400;
}

.my-subtabs {
    display: flex;
    gap: 6px;
    margin-bottom: 8px;
}

.my-subtabs button {
    height: 26px;
    padding: 0 12px;
    border-radius: 13px;
    background: #f4f4f6;
    color: var(--text-2);
    font-size: 12px;
}

.my-subtabs button.active {
    background: var(--red-soft);
    color: var(--red);
    font-weight: 600;
}

.my-subtabs button:hover {
    background: #ececf0;
}

.my-subtabs button.active:hover {
    background: var(--red-soft);
    color: var(--red);
}

/* ---------------- 列表行 ---------------- */

.my-rows {
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
}

.my-row {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 11px 10px;
    border-bottom: 1px solid #f6f6f6;
    font-size: 13px;
}

.my-row:last-child {
    border-bottom: 0;
}

.my-row-ico {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    border-radius: 8px;
    background: #f7f7f9;
    color: var(--text-2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
}

.my-row-main {
    flex: 1;
    min-width: 0;
}

.my-row-title {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.my-row-sub {
    font-size: 11px;
    color: var(--text-3);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.my-row-sub.wrap {
    white-space: normal;
    line-height: 1.6;
}

.my-row-val {
    font-size: 12px;
    color: var(--text-3);
    white-space: nowrap;
}

.my-row-val.red {
    color: var(--red);
}

.my-tag {
    font-size: 10px;
    border-radius: 4px;
    padding: 1px 5px;
    background: #eef4ff;
    color: var(--blue);
    margin-left: 5px;
    white-space: nowrap;
}

.my-tag.ok {
    background: #eaf7f0;
    color: var(--green);
}

.my-tag.warn {
    background: #fff6e6;
    color: #b06d00;
}

.my-tag.off {
    background: #f2f2f4;
    color: var(--text-3);
}

/* ---------------- 开关 ---------------- */

.my-switch {
    width: 44px;
    height: 25px;
    flex: 0 0 44px;
    border-radius: 13px;
    background: #ddd;
    position: relative;
    transition: background .2s;
}

.my-switch::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 21px;
    height: 21px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .2);
    transition: left .2s;
}

.my-switch.on {
    background: var(--green);
}

.my-switch.on::after {
    left: 21px;
}

/* ---------------- 号码宫格 ---------------- */

.my-numgrid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
}

.my-num {
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    background: #f4f4f6;
    color: var(--text-2);
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
}

.my-num.on {
    color: #fff;
    background: radial-gradient(circle at 32% 26%, #ff8a75, #d90000);
    box-shadow: inset 0 -2px 5px rgba(0, 0, 0, .2);
}

.my-num.on.b {
    background: radial-gradient(circle at 32% 26%, #8bb8ff, #0a56c7);
}

.my-num.on.g {
    background: radial-gradient(circle at 32% 26%, #74d69e, #178a4c);
}

.my-num:hover {
    border-color: var(--red);
}

.my-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.my-chip {
    height: 30px;
    padding: 0 14px;
    border-radius: 15px;
    background: #f4f4f6;
    color: var(--text-2);
    font-size: 13px;
}

.my-chip.on {
    background: var(--red-soft);
    color: var(--red);
    font-weight: 600;
}

.my-chip:hover {
    background: #ececf0;
}

.my-chip.on:hover {
    background: var(--red-soft);
    color: var(--red);
}

/* ---------------- 统计图 ---------------- */

.my-bars {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 96px;
    padding: 6px 0 0;
    border-bottom: 1px solid var(--line);
}

.my-bar {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    height: 100%;
}

.my-bar i {
    display: block;
    width: 100%;
    max-width: 12px;
    background: linear-gradient(180deg, #ff7a6b, #CC0000);
    border-radius: 3px 3px 0 0;
    min-height: 2px;
}

.my-bar.zero i {
    background: #eee;
}

.my-bar-labels {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: var(--text-3);
    padding-top: 5px;
}

.my-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.my-metric {
    background: #fafafa;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px 6px;
    text-align: center;
}

.my-metric b {
    display: block;
    font-size: 17px;
    color: var(--red);
    font-family: "DIN Alternate", Menlo, Consolas, monospace;
}

.my-metric span {
    font-size: 11px;
    color: var(--text-3);
}

/* ---------------- 消息 ---------------- */

.my-msg {
    padding: 11px 10px;
    border-bottom: 1px solid #f6f6f6;
    position: relative;
}

.my-msg:last-child {
    border-bottom: 0;
}

.my-msg-title {
    font-size: 13px;
    font-weight: 600;
    padding-right: 58px;
}

.my-msg.unread .my-msg-title::before {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--red);
    margin-right: 5px;
    vertical-align: middle;
}

.my-msg-body {
    font-size: 12px;
    color: var(--text-3);
    margin-top: 4px;
    line-height: 1.6;
}

.my-msg-time {
    position: absolute;
    top: 12px;
    right: 10px;
    font-size: 11px;
    color: var(--text-3);
}

/* ---------------- 签到日历 ---------------- */

.my-cal {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
}

.my-cal-day {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 8px 2px;
    text-align: center;
    font-size: 11px;
    color: var(--text-3);
}

.my-cal-day b {
    display: block;
    font-size: 13px;
    color: var(--text-2);
    margin-top: 3px;
}

.my-cal-day.on {
    background: #fff6f6;
    border-color: #ffd2d2;
    color: var(--red);
}

.my-cal-day.on b {
    color: var(--red);
}

.my-cal-day.today {
    border-color: var(--red);
    font-weight: 600;
}

/* ---------------- 表单 ---------------- */

.my-field {
    margin-bottom: 10px;
}

.my-field label {
    display: block;
    font-size: 12px;
    color: var(--text-2);
    margin-bottom: 5px;
}

.my-field input,
.my-field textarea {
    width: 100%;
    height: 36px;
    padding: 0 11px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fafafa;
    font-size: 13px;
    outline: none;
    font-family: inherit;
}

.my-field textarea {
    height: 62px;
    padding: 8px 11px;
    resize: none;
}

.my-field input:focus,
.my-field textarea:focus {
    border-color: var(--red);
    background: #fff;
}

.my-colors {
    display: flex;
    gap: 8px;
}

.my-color {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 2px solid transparent;
}

.my-color.on {
    border-color: #333;
    box-shadow: 0 0 0 2px #fff inset;
}

/* ---------------- 登录 / 注册弹窗 ---------------- */

.my-mask {
    position: fixed;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, .45);
    z-index: 120;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.my-mask[hidden] {
    display: none;
}

.my-modal {
    width: 100%;
    max-width: 340px;
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .25);
}

.my-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 14px 0;
}

.my-modal-head h3 {
    font-size: 16px;
    margin: 0;
}

.my-modal-close {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #f4f4f6;
    color: var(--text-3);
    font-size: 16px;
    line-height: 1;
}

.my-modal-tabs {
    display: flex;
    gap: 6px;
    padding: 12px 14px 0;
}

.my-modal-tabs button {
    flex: 1;
    height: 30px;
    border-radius: 15px;
    background: #f4f4f6;
    color: var(--text-2);
    font-size: 13px;
}

.my-modal-tabs button.active {
    background: var(--red-soft);
    color: var(--red);
    font-weight: 600;
}

.my-modal-body {
    padding: 12px 14px 16px;
}

.my-modal-msg {
    font-size: 12px;
    color: var(--red);
    min-height: 18px;
    margin-top: 6px;
}

.my-modal-ops {
    display: flex;
    gap: 8px;
    margin-top: 4px;
}

.my-modal-ops .my-btn {
    flex: 1;
    background: var(--red);
    color: #fff;
    font-weight: 600;
    height: 36px;
}

.my-modal-ops .my-btn.ghost {
    background: #f4f4f6;
    color: var(--text-2);
    border: 1px solid var(--line);
}

.my-tip {
    font-size: 11px;
    color: var(--text-3);
    line-height: 1.7;
    padding: 8px 2px 0;
}

/* ---------------- 其他 ---------------- */

.my-note {
    font-size: 11px;
    color: var(--text-3);
    line-height: 1.7;
    padding: 8px 2px 0;
}

.my-empty {
    text-align: center;
    color: var(--text-3);
    font-size: 13px;
    padding: 28px 10px;
}

.my-empty b {
    display: block;
    font-size: 30px;
    margin-bottom: 6px;
    opacity: .35;
}

.my-fav-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 9px;
}

.my-fav-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #fafafa;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 3px 5px 3px 9px;
    font-size: 12px;
}

.my-fav-item button {
    color: var(--text-3);
    font-size: 14px;
    line-height: 1;
    padding: 0 2px;
}

.my-countdown {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff6f6;
    border: 1px solid #ffe0e0;
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 10px;
    font-size: 12px;
    color: var(--text-2);
}

.my-countdown b {
    font-family: "DIN Alternate", Menlo, Consolas, monospace;
    color: var(--red);
    font-size: 16px;
    letter-spacing: .5px;
}

.my-loading {
    text-align: center;
    color: var(--text-3);
    font-size: 13px;
    padding: 26px 10px;
}

/* ---------------- 桌面端 ----------------
   原则：PC 与手机端功能完全一致，只做布局与密度调整，
   不新增/隐藏任何功能区，不改变任何交互行为。
   断点与 style.css / wallet.css 统一为 760px。 */

@media screen and (min-width: 760px) {
    /* 功能宫格：13 项，桌面 6 列排 3 行（手机 4 列） */
    .my-menu-grid {
        grid-template-columns: repeat(6, 1fr);
        gap: 8px 0;
    }

    /* 页签条：13 个页签在 928px 内放不下（实测需约 1073px）。
       手机端靠手指横向滑动可以滑出来；
       PC 端滚动条被隐藏且鼠标无法横滚，最后 2 个页签实际点不到。
       因此桌面改为自动换行铺满，保证 13 个功能入口全部可见可点，
       与手机端的功能集合完全一致。 */
    .my-tabs {
        flex-wrap: wrap;
        overflow-x: visible;
        padding: 12px 16px 10px;
        gap: 8px;
    }

    .my-tabs button {
        height: 30px;
        padding: 0 14px;
        font-size: 13px;
    }

    .my-tab-body {
        padding: 0 16px 18px;
    }

    .my-user {
        padding: 18px 16px 14px;
    }

    .my-avatar {
        width: 60px;
        height: 60px;
        flex: 0 0 60px;
        font-size: 22px;
    }

    .my-name {
        font-size: 18px;
    }

    /* 概览三格：桌面拉开间距，数字更大 */
    .my-stats {
        margin-bottom: 12px;
    }

    .my-stat {
        padding: 16px 4px;
    }

    .my-stat b {
        font-size: 22px;
        min-height: 33px;
    }

    .my-stat-act b svg {
        width: 22px;
        height: 22px;
    }

    .my-stat span {
        font-size: 12px;
    }

    /* 行列表：桌面加高，文字不挤 */
    .my-row {
        padding: 13px 12px;
        font-size: 13px;
    }

    .my-row-title {
        font-size: 14px;
    }

    .my-row-sub {
        font-size: 12px;
    }

    /* 号码宫格：桌面 10 列，49 个号码排满 5 行 */
    .my-numgrid {
        grid-template-columns: repeat(10, 1fr);
        gap: 8px;
    }

    .my-num {
        font-size: 15px;
    }

    /* 签到日历：桌面每格更大 */
    .my-cal-day {
        padding: 12px 2px;
    }

    /* 表单控件：桌面加大点击区域 */
    .my-field input,
    .my-field textarea {
        height: 40px;
        font-size: 14px;
    }

    .my-btn {
        height: 34px;
        padding: 0 18px;
        font-size: 13px;
    }

    .my-btn.small {
        height: 29px;
        padding: 0 14px;
    }

    /* 弹窗：桌面放大一档，与手机一致但更适合鼠标 */
    .my-modal {
        max-width: 400px;
    }

    .my-modal-tabs button {
        height: 32px;
    }

    .my-modal-ops .my-btn {
        height: 38px;
    }
}

/* ---------------- 分页（钱包页「我的订单 / 资金流水」共用） ---------------- */

.my-pager {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    padding: 12px 0 4px;
}
