/* 小奶猫后台 · 视觉跟小程序对齐
   浅天蓝底 + 白瓷卡片 + 机器猫四色（蓝 / 铃铛黄 / 鼻子红 / 薄荷） */
:root {
    --sky: #F6FAFD;
    --sky-2: #DCEEF9;
    --sky-head: #D9EFFB;
    --white: #FFFFFF;

    --blue: #1B9CD8;
    --blue-deep: #1280B6;
    --blue-soft: #EAF6FD;
    --blue-mist: #F1F9FE;

    --yellow: #FFC22E;
    --yellow-soft: #FFF3D2;
    --pink: #FF9FC0;
    --pink-soft: #FFEAF2;
    --mint: #7FD6C2;
    --mint-soft: #E4FAF4;
    --red: #FF6B5A;
    --red-soft: #FFE2DD;

    --ink: #22303C;
    --ink-2: #5B6E7D;
    --ink-3: #93A5B2;
    --line: #E6EFF5;
    --shadow: 0 10px 26px rgba(38, 96, 132, 0.08);
    --shadow-soft: 0 4px 14px rgba(38, 96, 132, 0.06);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
    background: var(--sky);
    color: var(--ink);
    font-size: 14px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }
.muted { color: var(--ink-3); font-size: 13px; }
.right { text-align: right; }
.error { color: var(--red); font-size: 13px; }

/* ---------- 登录 ---------- */
.login {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    background: linear-gradient(165deg, #D9EFFB 0%, #EFF8FD 46%, #FFF8E8 100%);
    padding: 24px;
}

.login-card {
    width: 100%;
    max-width: 360px;
    background: var(--white);
    border-radius: 30px;
    padding: 34px 28px 26px;
    box-shadow: 0 22px 54px rgba(30, 86, 118, 0.14);
    text-align: center;
}

.login-cat {
    width: 92px;
    height: 92px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--blue-soft);
    padding: 0;
    border: 4px solid #FFFFFF;
    box-shadow: 0 6px 18px rgba(27, 156, 216, .18);
}

.login-card h1 {
    font-size: 22px;
    margin: 12px 0 2px;
    letter-spacing: -0.4px;
    font-weight: 800;
}

.login-sub { color: var(--ink-3); font-size: 13px; margin: 0 0 22px; }

.login-card input {
    width: 100%;
    height: 48px;
    border: 2px solid var(--line);
    border-radius: 16px;
    padding: 0 15px;
    font-size: 15px;
    outline: none;
    background: var(--blue-mist);
    transition: border-color .15s, background .15s;
}

.login-card input:focus { border-color: var(--blue); background: #fff; }

.login-error { color: var(--red); font-size: 13px; min-height: 20px; margin: 10px 0 0; }
.login-card .btn { margin-top: 14px; }
.login-foot { color: #7C9AAE; font-size: 12px; margin: 0; letter-spacing: .5px; }
.login-icp { margin-top: 10px; }

/* ---------- 备案信息（页面底部常驻） ----------
   工信部要求：备案号必须在页面上可见，并且能跳到 beian.miit.gov.cn。
   字号不小于 12px、对比度够，桌面和手机都不折行截断 */
.site-foot {
    max-width: 720px;
    margin: 26px auto 8px;
    padding: 16px 4px 2px;
    border-top: 1px solid var(--line);
    text-align: center;
    color: var(--ink-3);
    font-size: 12px;
    line-height: 1.9;
}

.site-foot-row { margin: 0; }

.site-foot-sub { color: var(--ink-3); letter-spacing: .4px; }

.site-foot-link {
    /* 备案号是监管要求「清晰可见」的信息：用正文色 + 中等字重，
       不能灰到看不清（对比度按 WCAG AA 算过，深底浅底都够） */
    color: var(--ink);
    font-weight: 500;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    padding-bottom: 1px;
    transition: color .15s, border-color .15s;
    word-break: break-all;
}

.site-foot-link:hover,
.site-foot-link:focus-visible { color: var(--blue-deep); border-bottom-color: var(--blue); }

/* ---------- 左侧竖排导航 ---------- */
#app { padding-left: 200px; }

.topbar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 20;
    width: 200px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    padding: 18px 12px 14px;
    background: linear-gradient(180deg, var(--sky-head), #EDF7FD 46%, #F7FBFE);
    border-right: 1px solid #DCEBF5;
    overflow-y: auto;
}

.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; padding: 0 4px; }

.brand-cat {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    background: #fff;
    padding: 0;
    border: 2px solid rgba(255, 255, 255, .9);
    box-shadow: 0 3px 10px rgba(12, 60, 88, .18);
}

.brand-text { line-height: 1.15; }
.brand-text b { display: block; font-size: 16px; font-weight: 800; color: #24485D; letter-spacing: -0.2px; }
.brand-text span { font-size: 11px; color: #7595A8; letter-spacing: .6px; }

.tabs {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    overflow: visible;
    background: transparent;
    padding: 0;
    border-radius: 0;
    max-width: none;
}

.tab {
    width: 100%;
    border: none;
    background: transparent;
    color: #5C7C90;
    font-size: 14px;
    padding: 10px 14px;
    border-radius: 12px;
    text-align: left;
    cursor: pointer;
    white-space: nowrap;
    font-family: inherit;
    transition: background .15s, color .15s;
}

.tab:hover { background: #E4F2FA; }
.tab.active { background: var(--blue); color: #fff; font-weight: 700; box-shadow: 0 4px 12px rgba(27, 156, 216, .28); }

#logout { width: 100%; }

/* ---------- 按钮 ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 40px;
    padding: 0 18px;
    border-radius: 999px;
    border: none;
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    transition: transform .08s, background .15s;
    white-space: nowrap;
}

.btn:active { transform: scale(.97); }
.btn-primary { background: var(--blue); color: #fff; font-weight: 700; box-shadow: 0 6px 16px rgba(27, 156, 216, .25); }
.btn-primary:hover { background: var(--blue-deep); }

.btn-ghost { background: #fff; color: var(--ink-2); border: 1px solid var(--line); }
.btn-ghost:hover { background: var(--blue-soft); color: var(--blue-deep); }

.btn-danger { background: var(--red-soft); color: #D9503F; }
.btn-block { width: 100%; }
.btn-sm { height: 30px; padding: 0 12px; font-size: 13px; border-radius: 999px; }

.icon-btn {
    border: none;
    background: transparent;
    font-size: 16px;
    color: var(--ink-3);
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    line-height: 1;
}

.icon-btn:hover { background: var(--blue-soft); color: var(--blue-deep); }

/* ---------- 布局 ---------- */
.main { max-width: 1180px; margin: 0 auto; padding: 22px 24px 60px; }
.panel { display: flex; flex-direction: column; gap: 18px; }

.card {
    background: var(--white);
    border-radius: 24px;
    padding: 22px;
    box-shadow: var(--shadow);
}

.card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.card-head h2 { font-size: 16px; margin: 0; letter-spacing: -0.2px; font-weight: 800; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding: 2px 4px;
}

.page-head h2 { font-size: 22px; margin: 0 0 2px; letter-spacing: -0.4px; font-weight: 800; }
.page-head p { margin: 0; max-width: 620px; }

.hello {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: linear-gradient(120deg, #E4F4FC 0%, #F3FAFE 55%, #FFF7E6 100%);
    border-radius: 26px;
    padding: 20px 24px;
    box-shadow: var(--shadow-soft);
}

.hello h2 { margin: 0 0 2px; font-size: 20px; font-weight: 800; color: #24485D; }
.hello p { margin: 0; color: #6C8FA3; font-size: 13px; }
.hello img { width: 66px; height: 66px; object-fit: contain; }
.hello img.hello-cat { width: 66px; height: 66px; object-fit: cover; border-radius: 50%; border: 3px solid rgba(255,255,255,.9); box-shadow: 0 6px 16px rgba(27,156,216,.18); }

.search {
    height: 40px;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0 16px;
    font-size: 13px;
    outline: none;
    font-family: inherit;
    min-width: 200px;
    background: #fff;
    transition: border-color .15s;
}

.search:focus { border-color: var(--blue); }

/* ---------- 概览 ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; }

.stat {
    border-radius: 22px;
    padding: 18px 18px 16px;
    box-shadow: var(--shadow-soft);
    background: var(--white);
    position: relative;
    overflow: hidden;
}

.stat:nth-child(1) { background: #EAF7FE; }
.stat:nth-child(2) { background: #FFF3D9; }
.stat:nth-child(3) { background: #FFEDF4; }
.stat:nth-child(4) { background: #E6FAF5; }
.stat:nth-child(5) { background: #F0EFFE; }

.stat-k { color: #5E7C8E; font-size: 13px; font-weight: 600; }
.stat-v { font-size: 30px; font-weight: 800; color: #24485D; line-height: 1.15; margin-top: 6px; letter-spacing: -1px; }
.stat-unit { font-size: 13px; font-weight: 600; margin-left: 3px; color: #7D96A6; }

/* ---------- 商品分类 ---------- */
.cat-strip { display: flex; gap: 8px; flex-wrap: wrap; }

.cat-tab {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 38px;
    padding: 0 16px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink-2);
    font-size: 13px;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s, border-color .15s;
}

.cat-tab:hover { border-color: var(--sky-2); background: var(--blue-mist); }
.cat-tab.active { background: var(--ink); border-color: var(--ink); color: #fff; }
.cat-tab i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.cat-tab em { font-style: normal; opacity: .6; font-weight: 500; margin-left: 2px; }

.groups { display: flex; flex-direction: column; gap: 22px; }

.group {
    background: var(--white);
    border-radius: 24px;
    padding: 20px 22px 22px;
    box-shadow: var(--shadow);
}

.group-head {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.group-head h3 { margin: 0; font-size: 17px; font-weight: 800; letter-spacing: -0.2px; }

.group-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.group-count {
    font-size: 12px;
    color: #5E7C8E;
    background: var(--blue-mist);
    padding: 2px 9px;
    border-radius: 999px;
    font-weight: 600;
}

.group-sub { color: var(--ink-3); font-size: 12px; flex: 1; min-width: 120px; }

.goods-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(246px, 1fr));
    gap: 12px;
}

.goods {
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 10px;
    background: #FDFEFF;
    transition: border-color .15s, box-shadow .15s;
}

.goods:hover { border-color: #CFE9F7; box-shadow: 0 6px 16px rgba(38, 96, 132, .07); }
.goods.off { opacity: .62; background: #FAFBFC; }

.goods-img {
    width: 62px;
    height: 62px;
    border-radius: 14px;
    object-fit: cover;
    background: var(--blue-mist);
    flex-shrink: 0;
}

.goods-body { flex: 1; min-width: 0; }
.goods-name {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.goods-id { color: var(--ink-3); font-size: 11px; margin-top: 1px; letter-spacing: .3px; }
.goods-price { font-size: 14px; font-weight: 800; color: var(--blue-deep); margin-top: 5px; }
.goods-price s { color: var(--ink-3); font-weight: 400; font-size: 11px; margin-left: 5px; }
.goods-price em { color: #9A7A22; font-style: normal; font-size: 12px; background: var(--yellow-soft); padding: 1px 7px; border-radius: 999px; }

.goods-actions { display: flex; flex-direction: column; gap: 6px; flex-shrink: 0; }
.goods-actions .btn { height: 26px; padding: 0 10px; font-size: 12px; }

.group-empty {
    border: 1px dashed #D6E7F1;
    border-radius: 18px;
    padding: 22px;
    text-align: center;
    color: var(--ink-3);
    font-size: 13px;
    background: #FCFEFF;
}

/* ---------- 列表 / 订单 ---------- */
.list { display: flex; flex-direction: column; gap: 12px; }

.order-card { border: 1px solid var(--line); border-radius: 20px; padding: 16px 18px; background: #FDFEFF; }
.order-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.order-code { font-weight: 800; font-size: 16px; letter-spacing: .4px; }
.order-meta { color: var(--ink-3); font-size: 13px; }
/* 顾客这一行：微信头像 + 昵称 + 手机号。没授权时头像位置显示昵称首字/尾号 */
.order-customer { display: flex; align-items: center; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.order-customer .cust-phone { font-size: 13px; letter-spacing: .2px; }
.order-customer .btn { padding: 0 8px; height: 24px; font-size: 11px; }
.cust-avatar {
    position: relative; width: 30px; height: 30px; flex-shrink: 0;
    border-radius: 50%; overflow: hidden;
    background: linear-gradient(140deg, #BFE8FA, #E3F6FF);
    color: #12678F;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 800; line-height: 1;
}
.cust-avatar-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cust-name { font-size: 13px; font-weight: 700; color: var(--ink); max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cust-name-off { font-weight: 400; color: var(--ink-3); }
/* 备用电话：浅黄底色，和主号拉开层次，一眼看出「还有一个人能联系」 */
.cust-backup {
    display: inline-flex; align-items: center;
    padding: 1px 8px; border-radius: 999px;
    background: var(--yellow-soft); color: #8A6312;
    font-size: 12px; letter-spacing: .2px; white-space: nowrap;
}
.order-items { margin: 10px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 4px; }
.order-items li { color: var(--ink-2); font-size: 13px; }

.order-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed var(--line);
    flex-wrap: wrap;
}

.order-amount { font-weight: 800; color: var(--ink); }

.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.pill-making { background: var(--yellow-soft); color: #96721A; }
/* 做好了等人来拿：绿色，和「已取走」的灰区分开 */
.pill-ready { background: var(--mint-soft); color: #2E9E6B; }
.pill-done { background: #EDF1F4; color: #6B7C87; }
.pill-cancelled { background: #F1F3F5; color: var(--ink-3); }
.pill-on { background: var(--blue-soft); color: var(--blue-deep); }
.pill-off { background: #F1F3F5; color: var(--ink-3); }
.pill-unpaid { background: #FFF0E2; color: #B4621C; }
/* 下单后的第一站：等店主确认收款，之后才进制作中 */
.pill-pending { background: #FFF0E2; color: #B4621C; }
.pill-paid { background: var(--mint-soft); color: #2E9E6B; }
/* 退过钱的单：比「已取消」更醒目一点，避免被当成白收的钱 */
.pill-refund { background: #FDECEC; color: #C0392B; }

/* 退款记录：金额、时间、原因一行看完 */
.order-refund {
    margin-top: 8px;
    padding: 8px 12px;
    border-radius: 8px;
    background: #FDF3F2;
    border: 1px solid #F8DAD6;
    color: #A33A2C;
    font-size: 12.5px;
}

/* 顾客提了售后还没处理：提示店主去下面处理，不是让他自己猜 */
.order-after {
    margin-top: 8px;
    padding: 8px 12px;
    border-radius: 8px;
    background: #FFF7EE;
    border: 1px solid #FFE2C4;
    color: #A9550F;
    font-size: 12.5px;
}

/* 退款按钮：红色但不用实心，避免和「删除」抢注意力 */
.btn-refund { background: #FDECEC; color: #C0392B; border: 1px solid #F6D3CE; }
.btn-refund:hover { background: #FADCD8; }

/* ---------- 售后工单 ---------- */
.after-list { display: flex; flex-direction: column; gap: 10px; }
.after-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #FDFEFF;
    flex-wrap: wrap;
}
.after-row-done { background: #FAFBFC; }
.after-main { min-width: 0; }
.after-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; }
.after-title b { letter-spacing: .4px; }
.after-amount { color: #C0392B; font-weight: 700; }
.after-meta { color: var(--ink-3); font-size: 12.5px; margin-top: 4px; }

/* 待收款放太久：提醒店主处理，别一直挂着 */
.order-alert {
    margin-top: 8px;
    padding: 8px 12px;
    border-radius: 8px;
    background: #FFF7EE;
    border: 1px solid #FFE2C4;
    color: #A9550F;
    font-size: 12.5px;
}

.btn-paid {
    background: #2E9E6B;
    color: #FFFFFF;
    border: 1px solid #2E9E6B;
    white-space: nowrap;
}
.btn-paid:hover { background: #278C5E; border-color: #278C5E; }
.btn-paid:disabled { opacity: 0.6; cursor: default; }

/* 待付款单子的唯一出口：点完客户小程序上才从「待付款」变「制作中」，
   所以给它和「做好了」同一档的橙色，别混在灰按钮里 */
.btn-paid-main {
    background: linear-gradient(135deg, #F5A155, #EE8236);
    color: #FFFFFF;
    border: 1px solid #EE8236;
    white-space: nowrap;
}
.btn-paid-main:hover { background: linear-gradient(135deg, #F0913F, #E5762A); border-color: #E5762A; }
.btn-paid-main:disabled { opacity: 0.6; cursor: default; }

/* 待付款提示条：解释为什么这单还不能做 */
.order-pending {
    margin-top: 8px;
    padding: 10px 12px;
    border-radius: 10px;
    border-left: 3px solid #EE8236;
    background: #FFF8F0;
    color: #8A4713;
    font-size: 13px;
    line-height: 1.5;
}

/* 「做好了，通知客户」：店里最常点的一个，比「已收款」更醒目 */
.btn-ready {
    background: linear-gradient(135deg, #F5A155, #EE8236);
    color: #FFFFFF;
    border: 1px solid #EE8236;
    font-weight: 700;
    white-space: nowrap;
    box-shadow: 0 6px 14px rgba(238, 130, 54, 0.24);
}
.btn-ready:hover { background: linear-gradient(135deg, #EE9440, #E5762A); }
.btn-ready:disabled { opacity: 0.7; cursor: default; box-shadow: none; }

/* 推送结果：成了绿字，没成把原因写清楚，别让店主以为客户已经知道了 */
.notify-ok { color: #2E9E6B; }
.notify-skip { color: #B4621C; }

/* ---------- 表格 ---------- */
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 12px; color: var(--ink-3); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: #FBFDFE; }

.name-cell b { display: block; font-size: 14px; }
.name-cell span { color: var(--ink-3); font-size: 12px; }
.money { font-weight: 700; }
.money s { color: var(--ink-3); font-weight: 400; margin-left: 6px; font-size: 12px; }
.empty-row { text-align: center; color: var(--ink-3); padding: 28px 0; }

/* ---------- 编辑器 ---------- */
.editor-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 12px; }

.editor-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #FCFEFF;
}

.editor-row .full { grid-column: 1 / -1; }

label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--ink-2); font-weight: 600; }

input, select, textarea {
    height: 40px;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 0 12px;
    font-size: 14px;
    font-family: inherit;
    color: var(--ink);
    background: #fff;
    outline: none;
    transition: border-color .15s;
}

textarea { height: auto; padding: 10px 12px; resize: vertical; line-height: 1.55; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); }

.check { flex-direction: row; align-items: center; gap: 8px; }
.check input { height: auto; width: 16px; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.form-grid .span2 { grid-column: 1 / -1; }

.field { display: flex; flex-direction: column; gap: 7px; }
.field-label { font-size: 13px; color: var(--ink-2); font-weight: 600; }

.save-bar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
    position: sticky;
    bottom: 0;
    background: linear-gradient(180deg, rgba(246, 250, 253, 0), var(--sky) 42%);
    padding: 14px 0;
}

/* ---------- 设置 ---------- */
/* 门店信息占左边宽栏，改密码收在右边窄栏；窄屏自动叠成一列 */
.settings-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
    gap: 18px;
    align-items: stretch;
}

/* 两张卡等高，保存按钮都压在卡片底部，看起来是一排 */
.settings-grid .card { display: flex; flex-direction: column; }
.settings-grid .card-actions { margin-top: auto; }
.settings-grid .card-head { margin-bottom: 16px; }
.settings-grid .card-head .muted { font-weight: 400; }

/* 收款微信比上面两张卡宽，单独占一整行 */
.settings-grid .card-wide { grid-column: 1 / -1; }

/* 手机打开：左边二维码，右边地址；窄屏上下排 */
.lan-box { display: flex; align-items: flex-start; gap: 26px; flex-wrap: wrap; }
.lan-qr { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 184px; }
.lan-qr img {
    width: 168px;
    height: 168px;
    padding: 8px;
    box-sizing: content-box;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fff;
    display: block;
    /* 二维码是 1 位灰度位图，放大时别插值，边缘才干净 */
    image-rendering: pixelated;
}
.lan-qr .muted { font-size: 12px; text-align: center; line-height: 1.5; }
.lan-side { flex: 1 1 320px; min-width: 260px; display: flex; flex-direction: column; gap: 12px; }
.lan-url { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.lan-url code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 15px;
    font-weight: 700;
    color: var(--blue-deep);
    background: var(--blue-mist);
    border-radius: 12px;
    padding: 9px 14px;
    word-break: break-all;
}
.lan-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.lan-list li { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; color: var(--ink-2); }
.lan-list code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; }
.lan-list .lan-name { color: var(--ink-3); }

@media (max-width: 640px) {
    .lan-box { flex-direction: column; align-items: center; }
    /* 竖排时 flex-basis 会变成高度，别让它把卡片撑出一大块空白 */
    .lan-side { width: 100%; min-width: 0; flex: 0 0 auto; }
    .lan-qr { min-width: 0; }
    .lan-qr img { width: 156px; height: 156px; }
}

.pay-editor { display: flex; align-items: flex-start; gap: 26px; flex-wrap: wrap; }
.pay-form {
    flex: 1 1 320px;
    min-width: 260px;
    max-width: 460px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.pay-code { flex: 0 1 330px; min-width: 260px; display: flex; flex-direction: column; gap: 10px; }
.pay-code .uploader { padding: 12px; gap: 12px; }
.pay-code .upload-preview { width: 84px; height: 84px; }
.pay-code #payQr { font-size: 12px; }

.field-hint {
    font-size: 12px;
    line-height: 1.75;
    color: #7C8B96;
    background: #F5F9FC;
    border-radius: 12px;
    padding: 10px 12px;
}
.field-hint b { color: #3D6C86; font-weight: 600; }

.form-stack { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }

.card-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 2px;
}

.card-actions .muted { max-width: 300px; line-height: 1.5; }

.card-tip {
    margin: 0;
    padding: 10px 12px;
    border-radius: 12px;
    background: #F1F8FC;
    color: #6C8FA3;
    font-size: 12px;
    line-height: 1.6;
}
.settings-grid .card-actions .btn-block { width: 100%; }

@media (max-width: 1120px) {
    .settings-grid { grid-template-columns: 1fr; }
}

/* 两个商品弹窗都收紧一点，字段一屏能看完，不用滚到一半找「上架」 */
#addModal .modal-card, #productModal .modal-card { max-height: 94vh; }
#addModal .modal-body, #productModal .modal-body { padding: 14px 22px; }
#addModal .form-grid, #productModal .form-grid { gap: 11px; margin-bottom: 11px; }
#addModal label, #productModal label { gap: 4px; }
#addModal .uploader, #productModal .uploader { padding: 12px; gap: 12px; }
#addModal .upload-preview, #productModal .upload-preview { width: 76px; height: 76px; border-radius: 14px; }
#addModal .cat-hint, #productModal .cat-hint { margin-top: 6px; }

.edit-id {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.edit-id .muted { font-size: 12px; }
.pill-id { background: var(--blue-mist); color: var(--blue-deep); font-weight: 700; letter-spacing: .4px; }

/* ---------- 分类选择：一列竖排，一行一个，点哪行就是哪个分类 ---------- */
.cat-pick { display: flex; flex-direction: column; gap: 8px; }

/* 修改弹窗里分类是定死的：只摆一个不可点的标签，不给换的机会 */
.cat-fixed {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    gap: 7px;
    height: 44px;
    padding: 0 18px;
    border-radius: 14px;
    border: 1.5px solid var(--blue);
    background: #EAF7FE;
    color: var(--blue-deep);
    font-size: 13px;
    font-weight: 800;
}
.cat-fixed .dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }

.cat-chip {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 9px;
    width: 100%;
    height: 42px;
    padding: 0 16px;
    border-radius: 14px;
    border: 1.5px solid var(--line);
    background: #fff;
    color: var(--ink-2);
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: border-color .15s, background .15s, color .15s;
}

.cat-chip:hover { border-color: #CFE9F7; background: var(--blue-mist); }
.cat-chip.active { border-color: var(--blue); background: #EAF7FE; color: var(--blue-deep); font-weight: 800; box-shadow: 0 0 0 1px var(--blue) inset; }
.cat-chip i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.cat-chip.active i { width: 11px; height: 11px; box-shadow: 0 0 0 2.5px rgba(27, 156, 216, 0.18); }
.cat-hint { margin: 14px 0 0; font-size: 12px; line-height: 1.5; color: var(--ink-3); }
.cat-hint.on { color: var(--blue-deep); }
.cat-hint.warn { color: var(--red); }
.cat-pick.need { border-radius: 14px; box-shadow: 0 0 0 3px var(--red-soft); }
.cat-pick.need .cat-chip { border-color: #F3B7AD; }

.dot-birthday { background: var(--blue); }
.dot-dessert { background: var(--pink); }
.dot-bakery { background: var(--yellow); }
.dot-drinks { background: var(--mint); }

/* ---------- 上传 ---------- */
.uploader {
    display: flex;
    gap: 14px;
    align-items: center;
    border: 1.5px dashed #CFE4F1;
    border-radius: 18px;
    padding: 14px;
    background: #FBFDFF;
    cursor: pointer;
    transition: border-color .15s, background .15s;
}

.uploader:hover, .uploader.drag { border-color: var(--blue); background: #F2FAFF; }

.upload-preview {
    width: 92px;
    height: 92px;
    border-radius: 16px;
    background: var(--blue-mist);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
    color: var(--ink-3);
    font-size: 12px;
    text-align: center;
}

.upload-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }

.upload-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.upload-body b { font-size: 13px; color: var(--ink); }
.upload-body .muted { font-size: 12px; }

.upload-track { height: 5px; border-radius: 999px; background: #E8F1F7; overflow: hidden; margin: 4px 0 2px; }
.upload-track i { display: block; height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, #6EC5EE, var(--blue)); transition: width .18s; }

/* ---------- 分段 ---------- */
.filter-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

/* 日期筛选：两个原生 date 输入 + 一个清除，窄屏整行换行 */
.date-filter {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--ink-2);
    font-weight: 600;
    white-space: nowrap;
}
.date-filter input[type="date"] {
    border: 1px solid #DCEBF5;
    border-radius: 10px;
    padding: 6px 8px;
    font-family: inherit;
    font-size: 13px;
    color: var(--ink);
    background: #fff;
}

/* 分页条：左边说清楚第几条到第几条，右边两个按钮 */
.pager {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 10px;
}
.pager:empty { display: none; }

/* 商品排序按钮：方形小箭头，不跟「改 / 删」抢宽度 */
.btn-move {
    min-width: 30px;
    padding-left: 0;
    padding-right: 0;
    font-size: 14px;
    line-height: 1;
}
.btn-move:disabled { opacity: .35; cursor: not-allowed; }

/* ---------- 操作日志 ---------- */
.log-list { display: flex; flex-direction: column; }
.log-row {
    display: grid;
    grid-template-columns: 128px 1fr 52px;
    gap: 12px;
    align-items: start;
    padding: 10px 2px;
    border-top: 1px dashed #EEF4F8;
}
.log-row:first-child { border-top: none; }
.log-when { color: var(--ink-3); font-size: 12.5px; white-space: nowrap; padding-top: 2px; }
.log-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; }
.log-title b { font-weight: 600; }
.log-detail { color: var(--ink-2); font-size: 13px; margin-top: 3px; word-break: break-word; }
.log-by { color: var(--ink-3); font-size: 12.5px; text-align: right; }

.seg {
    display: flex;
    gap: 4px;
    background: #EDF4F9;
    padding: 4px;
    border-radius: 999px;
    /* 窄屏放不下时横向滑动，别把「待付款」挤成竖排单字 */
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
}
.seg::-webkit-scrollbar { display: none; }

.seg-item {
    border: none;
    background: transparent;
    padding: 7px 16px;
    border-radius: 999px;
    font-size: 13px;
    color: var(--ink-2);
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    flex: 0 0 auto;
    white-space: nowrap;
}

.seg-item.active { background: #fff; color: var(--blue-deep); box-shadow: 0 2px 8px rgba(38, 96, 132, .12); }

/* ---------- 弹窗 ---------- */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(24, 52, 70, .38);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 50;
    backdrop-filter: blur(3px);
}

.modal-card {
    background: #fff;
    border-radius: 26px;
    width: 100%;
    max-width: 660px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 26px 64px rgba(20, 40, 55, .22);
}

.modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 22px 14px;
    border-bottom: 1px solid var(--line);
}

.modal-head h2 { margin: 0; font-size: 17px; font-weight: 800; }
.modal-body { padding: 18px 22px; overflow-y: auto; }
/* 弹窗底部按钮竖着排：一行一个，通栏宽，手机上也好点 */
.modal-foot { display: flex; flex-direction: column; align-items: stretch; gap: 8px; padding: 14px 22px 18px; border-top: 1px solid var(--line); }
.modal-foot .btn { width: 100%; justify-content: center; }
.modal-foot .error { flex: none; }
.modal-foot .error:empty { display: none; }

/* 短信设置：参数两列排，勾选框和说明通栏；不然一张卡被七个满宽输入框拉得很长 */
.sms-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 16px;
    max-width: 780px;
}
.sms-form .check, .sms-form .field-hint { grid-column: 1 / -1; }
.card-actions .sms-hint { max-width: 540px; }
@media (max-width: 760px) {
    .sms-form { grid-template-columns: 1fr; }
}

/* ---------- 会员 ---------- */
/* 概览里的「会员人数」是入口，不是装饰：鼠标移上去要能看出可以点 */
.stat-go { cursor: pointer; transition: transform .15s, box-shadow .15s; }
.stat-go:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(38, 96, 132, .14); }
.stat-go:focus-visible { outline: 3px solid rgba(27, 156, 216, .35); outline-offset: 2px; }
.stat-sub { margin-top: 4px; font-size: 12px; color: #6C8FA3; font-weight: 600; }
.stat-link { display: inline-block; margin-top: 6px; font-size: 11px; color: var(--blue-deep); font-weight: 700; }

.member-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.mstat {
    background: #fff;
    border-radius: 20px;
    padding: 14px 16px;
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.mstat:nth-child(1) { background: #EAF7FE; }
.mstat:nth-child(2) { background: #FFF3D9; }
.mstat:nth-child(3) { background: #E6FAF5; }
.mstat:nth-child(4) { background: #FFEDF4; }
.mstat-k { font-size: 12px; color: #5E7C8E; font-weight: 600; }
.mstat-v { font-size: 24px; font-weight: 800; color: #24485D; letter-spacing: -0.6px; line-height: 1.2; }
.mstat-v em { font-size: 12px; font-style: normal; font-weight: 600; color: #7D96A6; margin-left: 3px; }
.mstat-sub { font-size: 11px; color: #7D96A6; }

.table-wrap { width: 100%; overflow-x: auto; }
.member-table { min-width: 780px; }
/* 日期和次数不能被挤成两行：窄屏靠外面横向滑，不靠折行 */
.member-table th, .member-table td { white-space: nowrap; }
.member-cell { display: flex; align-items: center; gap: 9px; }
.member-avatar {
    width: 34px; height: 34px; flex-shrink: 0;
    border-radius: 50%;
    background: linear-gradient(140deg, #BFE8FA, #E3F6FF);
    color: #12678F;
    font-size: 13px; font-weight: 800;
    display: inline-flex; align-items: center; justify-content: center;
    letter-spacing: -0.3px;
    position: relative; overflow: hidden;
}
.member-avatar-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.member-id { min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.member-id b { font-size: 13px; letter-spacing: .2px; }
.member-id span { font-size: 11px; color: var(--ink-3); }
.member-copy { margin-left: 2px; padding: 0 8px; height: 24px; font-size: 11px; }
.member-note { min-width: 150px; height: 34px; font-size: 12px; }

/* 会员明细：一张宽一点的弹窗，上半截是档案，下半截是消费流水 */
.member-card { max-width: 760px; }
.member-head { align-items: flex-start; }
.member-headline { display: flex; align-items: center; gap: 12px; }
.member-headline .member-avatar { width: 46px; height: 46px; font-size: 17px; }
.member-headline h2 { font-size: 18px; letter-spacing: .3px; }
.member-headline p { margin: 2px 0 0; font-size: 12px; }

.member-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 16px; }
.mmetric { background: #F6FAFD; border-radius: 14px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.mmetric span { font-size: 11px; color: var(--ink-3); }
.mmetric b { font-size: 16px; color: #24485D; letter-spacing: -0.3px; }

.member-fields { display: grid; grid-template-columns: 1fr 2fr; gap: 10px; }
.member-fields input { height: 36px; font-size: 13px; }
.member-save-row { margin: 10px 0 18px; }
.member-save-row .muted { font-size: 12px; }

.member-record-head {
    display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
    padding-top: 14px; border-top: 1px solid var(--line); margin-bottom: 8px;
}
.member-record-head h2 { margin: 0; font-size: 15px; font-weight: 800; }

.member-records { display: flex; flex-direction: column; }
.mr-row {
    display: grid;
    grid-template-columns: 112px 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 11px 2px;
    border-bottom: 1px dashed var(--line);
}
.mr-row:last-child { border-bottom: none; }
.mr-row-off { opacity: .62; }
/* 取消的那笔金额划掉：不然一眼看过去还以为这单也算钱 */
.mr-row-off .mr-right em { text-decoration: line-through; color: var(--ink-3); }
.mr-when { display: flex; flex-direction: column; line-height: 1.35; }
.mr-when b { font-size: 12px; color: var(--ink-2); font-weight: 700; }
.mr-when span { font-size: 11px; color: var(--ink-3); letter-spacing: .4px; }
.mr-goods { min-width: 0; display: flex; flex-direction: column; line-height: 1.4; }
.mr-goods b { font-size: 13px; font-weight: 700; }
.mr-goods span { font-size: 11px; color: var(--ink-3); }
.mr-right { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.mr-right em { font-style: normal; font-weight: 800; font-size: 14px; color: #24485D; }

@media (max-width: 760px) {
    .member-metrics { grid-template-columns: repeat(2, 1fr); }
    .member-fields { grid-template-columns: 1fr; }
    .mr-row { grid-template-columns: 90px 1fr; }
    .mr-right { grid-column: 1 / -1; flex-direction: row; align-items: center; justify-content: space-between; }
    .member-table { min-width: 720px; }
    .table.member-table th:nth-child(1), .table.member-table td:nth-child(1) { display: table-cell; }
}

/* ---------- 提示 ---------- */
.toast {
    position: fixed;
    left: 50%;
    bottom: 32px;
    transform: translate(-50%, 20px);
    background: var(--ink);
    color: #fff;
    padding: 11px 22px;
    border-radius: 999px;
    font-size: 14px;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s, transform .2s;
    z-index: 80;
    max-width: 80vw;
    box-shadow: 0 12px 30px rgba(20, 40, 55, .22);
}

.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.bad { background: var(--red); }

code { background: var(--blue-soft); padding: 2px 7px; border-radius: 6px; font-size: 13px; color: var(--blue-deep); }

/* 窄屏（平板竖屏、手机）放不下侧栏，退回顶部横条，别把内容挤成一条缝 */
@media (max-width: 900px) {
    #app { padding-left: 0; }
    .topbar {
        position: sticky;
        top: 0;
        bottom: auto;
        width: auto;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: 10px;
        padding: 12px 16px;
        border-right: none;
        border-bottom: 1px solid #DCEBF5;
        overflow: visible;
    }
    .brand { padding: 0; }
    #logout { width: auto; margin-left: auto; }
    .tabs {
        flex: none;
        flex-direction: row;
        order: 3;
        width: 100%;
        overflow-x: auto;
        gap: 4px;
        background: rgba(255, 255, 255, .72);
        padding: 4px;
        border-radius: 999px;
    }
    .tab { width: auto; text-align: center; padding: 8px 16px; border-radius: 999px; }
}

@media (max-width: 760px) {
    .main { padding: 16px 14px 50px; }
    .form-grid, .editor-row { grid-template-columns: 1fr; }
    .table { font-size: 13px; }
    .table th:nth-child(1), .table td:nth-child(1) { display: none; }
    .hello img { display: none; }
    .goods-grid { grid-template-columns: 1fr; }
    .upload-preview { width: 74px; height: 74px; }
}

/* ---------- 首页公告 ---------- */
.ann-editor { display: flex; align-items: flex-start; gap: 24px; flex-wrap: wrap; }
.ann-form { flex: 1 1 280px; min-width: 240px; max-width: 420px; display: flex; flex-direction: column; gap: 14px; }
.ann-actions { margin-top: 2px; }

/* 预览按小程序真实宽度（375 - 左右各 28rpx）摆，不再拉满整行 */
.ann-stage {
    flex: 0 0 auto;
    width: 371px;
    max-width: 100%;
    margin-left: auto;
    padding: 12px 12px 14px;
    border-radius: 18px;
    background: #F7FBFE;
    border: 1px solid #E6F0F7;
}

.ann-stage-tag { display: block; font-size: 11px; color: #9BAEB9; letter-spacing: .4px; margin-bottom: 8px; }

.ann-preview {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 6px 12px;
    border-radius: 999px;
    background: #E3F2FB;
    color: #2C6C8F;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.6;
    overflow: hidden;
}

.ann-preview i {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #1B9CD8;
    flex-shrink: 0;
}

/* 跟小程序一样：一条文案从右往左滚过去，滚完回到右边再来一遍 */
.ann-preview-view { flex: 1; min-width: 0; overflow: hidden; }
.ann-preview-view > span {
    display: inline-block;
    white-space: nowrap;
    padding-left: 100%;
    padding-right: 20px;
    animation: ann-scroll linear infinite;
    animation-duration: 12s;
}

@keyframes ann-scroll {
    from { transform: translateX(0); }
    to { transform: translateX(-100%); }
}

.ann-preview.off { background: #F3F7F9; color: #9BAEB9; font-weight: 600; }
.ann-preview.off i { background: #C6D5DE; }
.ann-preview.off .ann-preview-view > span { animation: none; }

@media (max-width: 760px) {
    .ann-form { max-width: none; }
    .ann-stage { width: 100%; max-width: 371px; margin-left: 0; }
}

/* ---------- 首页门面（店名 + 欢迎语，用公告那套左右布局） ---------- */
.brand-preview {
    padding: 12px 14px 16px;
    border-radius: 16px;
    background: linear-gradient(160deg, #D9EFFB, #EDF7FD);
}

.brand-preview-nav { display: flex; align-items: center; gap: 6px; padding-right: 54px; }

/* 预览里的小圆跟着店铺头像走：变量由 admin.js 的 applyLogo() 统一喂，
   这里不再写死 /brand-cat.jpg，否则换完头像预览永远停在默认猫图 */
.brand-preview-logo {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    border-radius: 50%;
    background: #FFFFFF var(--brand-logo, url("/brand-cat.jpg")) center / cover;
}

.brand-preview-nav span {
    font-size: 14px;
    font-weight: 800;
    color: #24485D;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.brand-preview-greet { display: flex; align-items: center; gap: 6px; margin-top: 10px; }

.brand-preview-face {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    border-radius: 50%;
    background: #FFFFFF var(--brand-logo, url("/brand-cat.jpg")) center / cover;
}

.brand-preview-copy { display: flex; flex-direction: column; min-width: 0; flex: 1; }

.brand-preview-copy b {
    font-size: 13px;
    font-weight: 600;
    color: #31566B;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.brand-preview-copy em {
    margin-top: 2px;
    font-style: normal;
    font-size: 10px;
    color: #7595A8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.brand-preview-bag {
    margin-left: auto;
    flex-shrink: 0;
    padding: 3px 8px;
    border: 1px solid #D6EAF5;
    border-radius: 999px;
    background: #FFFFFF;
    font-size: 10px;
    color: #4D758D;
}

/* ---------- 积分兑换 ---------- */
.rw-grid { grid-template-columns: repeat(auto-fill, minmax(292px, 1fr)); }
.rw-grid .group-empty { grid-column: 1 / -1; }
.goods-id .pill { font-size: 11px; padding: 1px 8px; }
.redeem-tip { margin: 14px 0 0; font-size: 12px; }

/* 顾客兑换记录：领取码要一眼念得出来，用等宽字体拉开字距 */
.redeem-code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: var(--blue-deep);
    white-space: nowrap;
}

/* 「已领取」按钮：浅蓝底比灰边更像能点的，别让人以为已经禁用了 */
.btn-pick {
    background: var(--blue-mist);
    color: var(--blue-deep);
    border: 1px solid #CFE6F3;
    font-weight: 700;
    white-space: nowrap;
}

.btn-pick:hover { background: var(--blue-soft); border-color: #B5DCF0; }

/* ---------- 扫码核销：一个输入框收三种来源（扫码枪 / 手输 / 摄像头） ---------- */
.pick-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pick-input {
    flex: 1;
    min-width: 0;
    padding: 12px 16px;
    border: 1px solid #CFE6F3;
    border-radius: 14px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 16px;
    letter-spacing: 1.5px;
    color: var(--ink);
    background: #FBFDFF;
    outline: none;
}

.pick-input::placeholder {
    font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
    font-size: 13px;
    letter-spacing: 0;
    color: var(--ink-3);
}

.pick-input:focus {
    border-color: var(--blue);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(27, 156, 216, .10);
}

.pick-hint { margin: 10px 0 0; font-size: 12px; }

.pick-cam {
    position: relative;
    margin-top: 12px;
    border-radius: 16px;
    overflow: hidden;
    background: #0F2430;
}

.pick-cam.hidden { display: none; }

.pick-cam video {
    display: block;
    width: 100%;
    height: 230px;
    object-fit: cover;
}

.pick-cam-tip {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 10px;
    text-align: center;
    color: #fff;
    font-size: 12px;
    opacity: .85;
}

.pick-found {
    margin-top: 14px;
    padding: 16px 18px;
    border-radius: 16px;
    background: var(--blue-mist);
    border: 1px solid var(--line);
}

/* 查不到 / 码不认：换成暖色，和「查到了」一眼分开 */
.pick-found.pick-bad {
    background: #FFF7EE;
    border-color: #FFE2C4;
    color: #B4621C;
}

.pick-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.pick-name { font-size: 16px; font-weight: 800; }

.pick-meta {
    margin-top: 6px;
    font-size: 12.5px;
    color: var(--ink-2);
    line-height: 1.6;
}

.pick-found.pick-bad .pick-meta { color: #A9591A; }

.pick-actions {
    display: flex;
    gap: 10px;
    margin-top: 14px;
}

.pick-actions .btn { margin: 0; }

/* .btn 用了 inline-flex，会盖掉浏览器默认的 [hidden]；统一按隐藏处理 */
[hidden] { display: none !important; }

@media (max-width: 640px) {
    .log-row { grid-template-columns: 1fr; gap: 4px; }
    .log-when { order: 2; }
    .log-by { display: none; }
    .date-filter { width: 100%; flex-wrap: wrap; }
    .date-filter input[type="date"] { flex: 1 1 120px; min-width: 0; }

    /* 手机上备案号单独一行、字号不缩：缩到 10px 属于「看不清」，不合规范 */
    .site-foot {
        margin: 20px auto 4px;
        padding: 14px 2px 2px;
        font-size: 12px;
        line-height: 2;
    }
    .site-foot-sub { font-size: 11.5px; }
}

@media (prefers-reduced-motion: reduce) {
    .site-foot-link { transition: none; }
}
