/* ==========================================================================
   即购即达 · 新版前台「我的订单 / 个人中心」
   依赖 nm.css（只读，不修改），本文件只放这两页专属样式，类名统一 nm- 前缀
   ========================================================================== */

/* ==========================================================================
   1. 会员中心通用两栏骨架
   ========================================================================== */
.nm-mem { width: var(--nm-w); margin: 0 auto 34px; display: grid; grid-template-columns: 200px 980px; gap: 10px; align-items: start; }

.nm-mem-side { background: #fff; border: 1px solid #f0f0f0; position: sticky; top: 10px; }
.nm-mem-side-hd { height: 44px; line-height: 44px; padding: 0 16px; background: #f7f7f7; border-bottom: 1px solid #eee; font-size: 15px; font-weight: 700; color: #333; letter-spacing: .5px; }
.nm-mem-link { display: flex; align-items: center; gap: 8px; height: 42px; padding: 0 16px; font-size: 13px; color: #555; border-left: 3px solid transparent; border-bottom: 1px solid #f7f7f7; }
.nm-mem-link i { font-style: normal; font-size: 14px; width: 18px; text-align: center; opacity: .85; }
.nm-mem-link:hover { background: #fff8f8; color: var(--nm-red); }
.nm-mem-link.on { background: #fff1f1; border-left-color: var(--nm-red); color: var(--nm-red); font-weight: 700; }
.nm-mem-side-tip { margin: 12px; padding: 12px; background: #fffafa; border: 1px dashed #f2dcdc; font-size: 11px; line-height: 1.8; color: #b08b8b; }
.nm-mem-side-tip b { display: block; color: #d1797b; font-size: 12px; margin-bottom: 2px; }

.nm-mem-main { min-width: 0; }
.nm-mem-hd { height: 46px; display: flex; align-items: center; border-bottom: 2px solid #f0f0f0; margin-bottom: 12px; }
.nm-mem-hd h2 { font-size: 22px; color: #333; font-weight: 700; line-height: 24px; border-left: 6px solid var(--nm-red); padding-left: 12px; letter-spacing: 1px; }
.nm-mem-hd .sub { font-size: 12px; color: #aaa; margin-left: 12px; }
.nm-mem-hd .extra { margin-left: auto; font-size: 12px; color: #999; }
.nm-mem-hd .extra b { color: var(--nm-red); font-size: 15px; font-weight: 700; padding: 0 2px; }

/* 通用按钮 */
.nm-btn { display: inline-block; height: 32px; line-height: 30px; padding: 0 16px; border: 1px solid #ddd; background: #fff; color: #555; font-size: 12px; border-radius: 2px; text-align: center; cursor: pointer; transition: .15s; }
.nm-btn:hover { border-color: var(--nm-red); color: var(--nm-red); }
.nm-btn-primary { background: var(--nm-red); border-color: var(--nm-red); color: #fff !important; }
.nm-btn-primary:hover { background: var(--nm-red-dark); border-color: var(--nm-red-dark); color: #fff !important; }
.nm-btn-ghost { background: #fff; border-color: #f0c8c8; color: var(--nm-red) !important; }
.nm-btn-ghost:hover { background: #fff1f1; }
.nm-btn-danger { background: #fff; border-color: #eee; color: #999 !important; }
.nm-btn-danger:hover { background: #fff1f1; border-color: #f3b6b7; color: var(--nm-red) !important; }
.nm-btn-lg { height: 38px; line-height: 36px; padding: 0 26px; font-size: 13px; }
.nm-btn[disabled], .nm-btn.dis { background: #f5f5f5; border-color: #eee; color: #bbb !important; cursor: not-allowed; }

/* ==========================================================================
   2. 我的订单：状态 tab
   ========================================================================== */
.nm-ord-tabs { display: flex; background: #fff; border: 1px solid #f0f0f0; border-bottom: 0; height: 46px; margin-bottom: 10px; }
.nm-ord-tab { position: relative; display: flex; align-items: center; gap: 5px; padding: 0 20px; height: 46px; font-size: 13px; color: #666; border-bottom: 2px solid transparent; cursor: pointer; white-space: nowrap; }
.nm-ord-tab:hover { color: var(--nm-red); }
.nm-ord-tab.on { color: var(--nm-red); font-weight: 700; border-bottom-color: var(--nm-red); }
.nm-ord-tab .count { display: inline-block; min-width: 18px; height: 16px; line-height: 16px; padding: 0 5px; border-radius: 8px; background: #f5f5f5; color: #999; font-size: 11px; font-weight: 400; text-align: center; }
.nm-ord-tab.on .count { background: #ffe6e6; color: var(--nm-red); }
.nm-ord-tab .dot { display: none; }

/* ==========================================================================
   3. 我的订单：卡片
   ========================================================================== */
.nm-ord-list { display: flex; flex-direction: column; gap: 12px; }

.nm-ord-card { background: #fff; border: 1px solid #f0f0f0; }
.nm-ord-card:hover { border-color: #f3dcdc; box-shadow: 0 2px 10px rgba(227,57,60,.05); }

.nm-ord-hd { display: flex; align-items: center; gap: 18px; height: 40px; padding: 0 16px; background: #fafafa; border-bottom: 1px solid #f0f0f0; font-size: 12px; color: #999; }
.nm-ord-hd .no { color: #666; }
.nm-ord-hd .no b { font-weight: 400; color: #333; letter-spacing: .3px; }
.nm-ord-hd .tm { color: #aaa; }
.nm-ord-hd .st { margin-left: auto; font-size: 13px; font-weight: 700; color: #999; }
.nm-ord-hd .st.s0 { color: var(--nm-orange); }
.nm-ord-hd .st.s1 { color: #2c7be5; }
.nm-ord-hd .st.s2 { color: #13a8a8; }
.nm-ord-hd .st.s3 { color: #2e9e52; }
.nm-ord-hd .st.s4 { color: #aaa; }

.nm-ord-bd { padding: 0 16px; }
.nm-ord-th, .nm-ord-row { display: grid; grid-template-columns: 1fr 100px 70px 110px; align-items: center; }
.nm-ord-th { height: 34px; font-size: 11px; color: #bbb; border-bottom: 1px solid #f5f5f5; }
.nm-ord-th .c1 { padding-left: 4px; }
.nm-ord-th .c2, .nm-ord-th .c3, .nm-ord-th .c4 { text-align: center; }
.nm-ord-row { padding: 14px 0; border-bottom: 1px dashed #f2f2f2; }
.nm-ord-row:last-child { border-bottom: 0; }

.nm-ord-good { display: flex; align-items: center; gap: 12px; min-width: 0; padding-right: 16px; }
.nm-ord-pic { width: 64px; height: 64px; flex-shrink: 0; border: 1px solid #f4f4f4; background: #fafafa; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.nm-ord-pic img { width: 100%; height: 100%; object-fit: cover; }
.nm-ord-pic .ph { color: #d8c3c3; font-size: 22px; }
.nm-ord-name { min-width: 0; }
.nm-ord-name .n { display: block; font-size: 13px; color: #333; line-height: 19px; max-height: 38px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.nm-ord-name .n:hover { color: var(--nm-red); }
.nm-ord-name .tags { margin-top: 5px; }
.nm-tag { display: inline-block; font-size: 10px; line-height: 16px; padding: 0 5px; border-radius: 2px; margin-right: 5px; background: #f5f5f5; color: #999; }
.nm-tag.hot { background: #fff1e9; color: #e8722d; }
.nm-tag.group { background: #fff1f1; color: var(--nm-red); }

.nm-ord-price, .nm-ord-num { text-align: center; font-size: 12px; color: #666; }
.nm-ord-sub { text-align: center; font-size: 13px; color: #333; font-weight: 700; }

.nm-ord-ft { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: #fcfcfc; border-top: 1px solid #f5f5f5; font-size: 12px; color: #999; flex-wrap: wrap; }
.nm-ord-addr { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nm-ord-addr b { color: #666; font-weight: 400; }
.nm-ord-remark { color: #b99; max-width: 300px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nm-ord-total { margin-left: auto; color: #666; white-space: nowrap; }
.nm-ord-total b { color: var(--nm-red); font-size: 18px; font-weight: 700; margin-left: 4px; }
.nm-ord-total .ori { color: #bbb; text-decoration: line-through; margin-left: 8px; font-weight: 400; font-size: 12px; }

/* 空状态 / 未登录 / 骨架 */
.nm-ord-empty, .nm-ord-login { background: #fff; border: 1px solid #f0f0f0; padding: 74px 20px; text-align: center; color: #999; font-size: 13px; }
.nm-ord-empty .ico, .nm-ord-login .ico { display: block; font-size: 46px; line-height: 1; margin-bottom: 14px; opacity: .45; }
.nm-ord-empty .t, .nm-ord-login .t { font-size: 15px; color: #666; }
.nm-ord-empty .s, .nm-ord-login .s { margin-top: 6px; color: #aaa; font-size: 12px; }
.nm-ord-empty .nm-btn, .nm-ord-login .nm-btn { margin: 18px 6px 0; }
.nm-ord-login .nm-ord-login-btns { margin-top: 4px; }

.nm-ord-skel { background: #fff; border: 1px solid #f0f0f0; padding: 0 16px 14px; }
.nm-ord-skel .hd { height: 40px; margin: 0 -16px 12px; border-bottom: 1px solid #f5f5f5; padding: 12px 16px 0; }
.nm-ord-skel .row { display: flex; gap: 12px; padding: 10px 0; }
.nm-ord-skel .bx { height: 64px; width: 64px; flex-shrink: 0; }
.nm-ord-skel .ln { flex: 1; height: 14px; margin-top: 6px; }
.nm-ord-skel .ln.s { width: 40%; }

/* ==========================================================================
   4. 个人中心：用户卡
   ========================================================================== */
.nm-my-user { position: relative; display: flex; align-items: center; gap: 18px; padding: 22px 24px; background: linear-gradient(120deg, #fff4f3 0%, #fff 62%); border: 1px solid #f3dede; flex-wrap: wrap; }
.nm-my-user::after { content: ""; position: absolute; right: -30px; top: -50px; width: 180px; height: 180px; border-radius: 50%; background: rgba(227,57,60,.045); pointer-events: none; }
.nm-my-avatar { width: 78px; height: 78px; border-radius: 50%; flex-shrink: 0; overflow: hidden; background: linear-gradient(135deg, #ff7a7c, var(--nm-red)); color: #fff; font-size: 32px; font-weight: 700; display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 16px rgba(227,57,60,.22); }
.nm-my-avatar img { width: 100%; height: 100%; object-fit: cover; }
.nm-my-info { flex: 1; min-width: 220px; position: relative; z-index: 1; }
.nm-my-name { display: flex; align-items: center; gap: 8px; font-size: 20px; color: #2f2f2f; font-weight: 700; line-height: 1.3; }
.nm-my-name .lv { font-size: 10px; font-weight: 400; color: #c58a2b; background: #fff6e2; border: 1px solid #f5dfae; border-radius: 9px; padding: 1px 7px; }
.nm-my-meta { margin-top: 7px; font-size: 12px; color: #999; display: flex; flex-wrap: wrap; gap: 4px 16px; }
.nm-my-meta b { color: #666; font-weight: 400; }
.nm-my-acts { display: flex; align-items: center; gap: 8px; position: relative; z-index: 1; }
.nm-my-stats { display: flex; align-items: center; gap: 0; padding-left: 18px; border-left: 1px dashed #f0d8d8; position: relative; z-index: 1; }
.nm-my-stat { display: block; min-width: 76px; padding: 0 10px; text-align: center; }
.nm-my-stat b { display: block; font-size: 20px; font-weight: 700; color: var(--nm-red); line-height: 1.2; }
.nm-my-stat span { font-size: 12px; color: #999; }
.nm-my-stat:hover span { color: var(--nm-red); }

/* 快捷入口 */
.nm-my-quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 10px; }
.nm-qk { display: flex; align-items: center; gap: 12px; padding: 16px 18px; background: #fff; border: 1px solid #f0f0f0; transition: .15s; }
.nm-qk:hover { border-color: #f3c7c8; box-shadow: 0 4px 14px rgba(227,57,60,.07); transform: translateY(-1px); }
.nm-qk .ic { width: 38px; height: 38px; line-height: 38px; text-align: center; border-radius: 10px; background: #fff1f1; font-size: 19px; flex-shrink: 0; }
.nm-qk .tx b { display: block; font-size: 14px; color: #333; font-weight: 700; }
.nm-qk .tx span { display: block; font-size: 11px; color: #aaa; margin-top: 2px; }
.nm-qk:hover .tx b { color: var(--nm-red); }

/* ==========================================================================
   5. 个人中心：卡片 / 表单
   ========================================================================== */
.nm-my-card { background: #fff; border: 1px solid #f0f0f0; margin-top: 12px; }
.nm-my-card-hd { display: flex; align-items: center; height: 46px; padding: 0 18px; border-bottom: 1px solid #f3f3f3; }
.nm-my-card-hd h3 { font-size: 15px; color: #333; font-weight: 700; border-left: 3px solid var(--nm-red); padding-left: 9px; line-height: 15px; }
.nm-my-card-hd .tip { font-size: 11px; color: #bbb; margin-left: 10px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nm-my-card-hd .ops { margin-left: auto; display: flex; gap: 8px; flex-shrink: 0; }
.nm-my-card-bd { padding: 18px; }

.nm-my-form { max-width: 560px; }
.nm-my-row { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.nm-my-row:last-child { margin-bottom: 0; }
.nm-my-label { width: 76px; flex-shrink: 0; font-size: 13px; color: #666; text-align: right; }
.nm-my-input, .nm-my-select { flex: 1; min-width: 0; height: 34px; line-height: 32px; padding: 0 12px; border: 1px solid #e5e5e5; border-radius: 2px; background: #fff; font-size: 13px; color: #333; outline: 0; }
.nm-my-select { height: 34px; line-height: 1; padding: 0 8px; }
.nm-my-input:focus, .nm-my-select:focus { border-color: var(--nm-red); box-shadow: 0 0 0 2px rgba(227,57,60,.08); }
.nm-my-input[readonly] { background: #fafafa; color: #999; }
.nm-my-hint { font-size: 11px; color: #bbb; margin-top: 4px; }
.nm-my-submit { padding-left: 90px; margin-top: 4px; }
.nm-my-form-msg { margin-left: 10px; font-size: 12px; color: var(--nm-red); }

/* ==========================================================================
   6. 房产 / 收货地址
   ========================================================================== */
.nm-house-list { display: flex; flex-direction: column; gap: 10px; }
.nm-house-empty { padding: 34px 16px; text-align: center; color: #bbb; font-size: 13px; border: 1px dashed #eee; background: #fcfcfc; }
.nm-house-empty .ico { display: block; font-size: 34px; margin-bottom: 10px; opacity: .5; }
.nm-house-empty .nm-btn { margin-top: 14px; }

.nm-house-row { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid #f0f0f0; background: #fff; }
.nm-house-row.is-def { border-color: #f3c7c8; background: #fffafa; }
.nm-house-row:hover { border-color: #f3dcdc; }
.nm-house-info { flex: 1; min-width: 0; }
.nm-house-title { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; font-size: 14px; color: #333; font-weight: 700; }
.nm-house-title .addr { color: #999; font-weight: 400; font-size: 12px; }
.nm-house-badge { display: inline-block; font-size: 10px; line-height: 15px; padding: 0 5px; border-radius: 2px; }
.nm-house-badge.def { background: var(--nm-red); color: #fff; }
.nm-house-badge.rel { background: #f5f5f5; color: #999; }
.nm-house-sub { margin-top: 6px; font-size: 12px; color: #999; }
.nm-house-sub b { color: #666; font-weight: 400; }
.nm-house-ops { display: flex; gap: 6px; flex-shrink: 0; }
.nm-house-ops .nm-btn { height: 28px; line-height: 26px; padding: 0 11px; font-size: 12px; }

/* ==========================================================================
   7. 弹窗（绑定 / 编辑房产）
   ========================================================================== */
.nm-modal-mask { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 20px; }
.nm-modal { width: 100%; max-width: 440px; max-height: 88vh; background: #fff; border-radius: 4px; box-shadow: 0 16px 50px rgba(0,0,0,.25); display: flex; flex-direction: column; overflow: hidden; }
.nm-modal-hd { height: 46px; line-height: 46px; padding: 0 18px; border-bottom: 1px solid #f0f0f0; display: flex; align-items: center; background: #fafafa; }
.nm-modal-hd b { font-size: 15px; color: #333; }
.nm-modal-hd .x { margin-left: auto; font-size: 20px; line-height: 1; color: #bbb; cursor: pointer; }
.nm-modal-hd .x:hover { color: var(--nm-red); }
.nm-modal-bd { padding: 20px 18px 6px; overflow: auto; }
.nm-modal-ft { padding: 12px 18px; border-top: 1px solid #f3f3f3; display: flex; justify-content: flex-end; gap: 8px; background: #fff; }

/* ==========================================================================
   8. 响应式
   ========================================================================== */
@media (max-width: 1189px) {
    .nm-mem { width: 100%; padding: 0 10px; grid-template-columns: 190px 1fr; }
    .nm-mem-hd h2 { font-size: 20px; }
    .nm-ord-tab { padding: 0 13px; font-size: 12px; }
}
@media (max-width: 900px) {
    .nm-mem { display: block; padding: 0 10px; }
    .nm-mem-side { display: none; }
    .nm-mem-hd { height: 40px; margin-bottom: 10px; }
    .nm-mem-hd h2 { font-size: 18px; border-left-width: 4px; padding-left: 9px; }
    .nm-mem-hd .sub { display: none; }
    .nm-ord-tabs { height: auto; overflow-x: auto; white-space: nowrap; }
    .nm-ord-tab { height: 42px; padding: 0 12px; }
    .nm-ord-hd { height: auto; padding: 9px 12px; gap: 8px; flex-wrap: wrap; }
    .nm-ord-hd .st { margin-left: 0; }
    .nm-ord-bd { padding: 0 12px; }
    .nm-ord-th { display: none; }
    .nm-ord-row { grid-template-columns: 1fr auto; grid-template-rows: auto auto; row-gap: 6px; }
    .nm-ord-good { grid-column: 1 / -1; padding-right: 0; }
    .nm-ord-price { display: none; }
    .nm-ord-num { text-align: left; padding-left: 76px; }
    .nm-ord-sub { text-align: right; }
    .nm-ord-ft { padding: 10px 12px; }
    .nm-ord-addr { white-space: normal; flex-basis: 100%; }
    .nm-ord-remark { max-width: 100%; flex-basis: 100%; }
    .nm-ord-total { margin-left: 0; }
    .nm-my-user { padding: 16px; gap: 12px; }
    .nm-my-avatar { width: 58px; height: 58px; font-size: 24px; }
    .nm-my-name { font-size: 17px; }
    .nm-my-acts { margin-left: auto; }
    .nm-my-stats { width: 100%; padding: 12px 0 0; border-left: 0; border-top: 1px dashed #f0d8d8; justify-content: space-around; }
    .nm-my-quick { grid-template-columns: repeat(2, 1fr); }
    .nm-my-card-bd { padding: 14px; }
    .nm-my-row { gap: 10px; }
    .nm-my-label { width: 62px; font-size: 12px; }
    .nm-my-submit { padding-left: 0; }
    .nm-house-row { flex-wrap: wrap; }
    .nm-house-ops { width: 100%; justify-content: flex-end; }
    .nm-modal { max-width: 100%; }
}
