/* =====================================================================
   内部 CRM 系统 · 样式表（无构建依赖，直接生效）
   ===================================================================== */

:root {
    --pri: #2f5cf6;
    --pri-dark: #1f45d0;
    --pri-soft: #eaf0ff;
    --bg: #f4f6fb;
    --card: #ffffff;
    --line: #e5e9f2;
    --line-soft: #eff2f8;
    --txt: #1f2733;
    --txt-2: #4c586c;
    --muted: #7b879b;
    --ok: #0f9d6e;
    --warn: #d98324;
    --danger: #dc3d43;
    --radius: 14px;
    --shadow: 0 1px 2px rgba(23, 43, 77, .04), 0 8px 24px rgba(23, 43, 77, .05);
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--txt);
    font-size: 14px;
    line-height: 1.55;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
}

body.no-scroll { overflow: hidden; }

h1, h2, h3, h4, h5 { margin: 0; font-weight: 650; }
p { margin: 0; }
a { color: var(--pri); text-decoration: none; }

.muted { color: var(--muted); }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.money { color: var(--pri-dark); font-variant-numeric: tabular-nums; font-weight: 650; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.nowrap { white-space: nowrap; }
.sub { font-size: 12px; color: var(--muted); }

/* ---------------- 加载态 ---------------- */
.boot {
    min-height: 100vh;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: 14px; color: var(--muted);
}
.boot-spinner {
    width: 28px; height: 28px; border-radius: 50%;
    border: 3px solid #dde4f5; border-top-color: var(--pri);
    animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------- 布局 ---------------- */
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
    width: 238px; flex: 0 0 238px;
    background: #fff; border-right: 1px solid var(--line);
    display: flex; flex-direction: column;
    position: fixed; inset: 0 auto 0 0;
    z-index: 40;
}

.brand {
    display: flex; align-items: center; gap: 10px;
    padding: 20px 18px 16px;
}
.brand-mark {
    width: 36px; height: 36px; border-radius: 11px;
    background: linear-gradient(135deg, #2f5cf6, #5b8bff);
    color: #fff; font-weight: 700; font-size: 17px;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 6px 16px rgba(47, 92, 246, .28);
}
.brand-text { min-width: 0; }
.brand-text strong { display: block; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-text small { color: var(--muted); font-size: 11.5px; }

.nav { padding: 6px 10px; display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; }
.nav-item {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px; border-radius: 10px;
    color: var(--txt-2); font-size: 14px; cursor: pointer;
    border: 0; background: transparent; width: 100%; text-align: left;
    transition: background .15s, color .15s;
}
.nav-item svg { width: 18px; height: 18px; flex: 0 0 18px; opacity: .85; }
.nav-item:hover { background: #f5f7fd; color: var(--txt); }
.nav-item.active { background: var(--pri-soft); color: var(--pri-dark); font-weight: 600; }
.nav-item.active svg { opacity: 1; }
.nav-dot { width: 7px; height: 7px; border-radius: 50%; background: #e0483f; margin-left: auto; flex: 0 0 7px; }

.side-foot { padding: 12px 14px 18px; border-top: 1px solid var(--line-soft); }
.side-user { display: flex; align-items: center; gap: 10px; }
.side-user .avatar-sm {
    width: 32px; height: 32px; border-radius: 50%; background: #eef1f8; color: var(--txt-2);
    display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 13px;
}
.side-user .u-name { font-size: 13.5px; font-weight: 600; }
.side-user .u-role { font-size: 11.5px; color: var(--muted); }

.main { flex: 1; min-width: 0; margin-left: 238px; display: flex; flex-direction: column; }

.topbar {
    height: 60px; flex: 0 0 60px;
    display: flex; align-items: center; gap: 12px;
    padding: 0 24px; background: rgba(255, 255, 255, .86);
    border-bottom: 1px solid var(--line);
    position: sticky; top: 0; z-index: 30;
    backdrop-filter: saturate(180%) blur(8px);
}
.topbar h2 { font-size: 15px; font-weight: 650; }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.top-user { font-size: 13px; color: var(--txt-2); }

.view { padding: 22px 24px 40px; width: 100%; max-width: none; }

/* ---------------- 页头 ---------------- */
.page-head {
    display: flex; align-items: flex-end; justify-content: space-between;
    gap: 16px; margin-bottom: 16px; flex-wrap: wrap;
}
.page-head h1 { font-size: 21px; letter-spacing: -.2px; }
.page-head p { margin-top: 3px; font-size: 13px; }
.head-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ---------------- 卡片 ---------------- */
.card {
    background: var(--card); border: 1px solid var(--line);
    border-radius: var(--radius); box-shadow: var(--shadow);
}
.card-hd {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line-soft);
    flex-wrap: wrap;
}
.card-hd h3 { font-size: 14.5px; }
.card-bd { padding: 16px 18px; }

.grid-2 { display: grid; grid-template-columns: 1.15fr .85fr; gap: 16px; margin-top: 16px; }
.grid-2 > .card { min-width: 0; }

/* ---------------- 统计卡 ---------------- */
.stat-grid {
    display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
}
.stat-card {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    padding: 15px 16px; box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.stat-card.hl {
    background: linear-gradient(135deg, #2f5cf6, #5b8bff);
    border-color: transparent; color: #fff;
    box-shadow: 0 10px 26px rgba(47, 92, 246, .28);
}
.stat-card.hl .stat-label, .stat-card.hl .stat-meta { color: rgba(255, 255, 255, .82); }
.stat-card.hl .stat-meta b { color: #fff; }
.stat-label { font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
.stat-value { font-size: 21px; font-weight: 700; letter-spacing: -.4px; font-variant-numeric: tabular-nums; }
.stat-meta { display: flex; gap: 14px; margin-top: 8px; font-size: 12px; color: var(--muted); }
.stat-meta b { color: var(--txt); font-weight: 650; }

/* ---------------- 按钮 ---------------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 9px 15px; border-radius: 10px;
    border: 1px solid var(--line); background: #fff; color: var(--txt-2);
    font-size: 13.5px; font-weight: 550; cursor: pointer;
    transition: all .15s; white-space: nowrap; font-family: inherit;
}
.btn:hover { border-color: #cfd8ea; background: #fafbff; color: var(--txt); }
.btn:active { transform: translateY(1px); }
.btn.primary {
    background: var(--pri); border-color: var(--pri); color: #fff;
    box-shadow: 0 6px 16px rgba(47, 92, 246, .22);
}
.btn.primary:hover { background: var(--pri-dark); border-color: var(--pri-dark); color: #fff; }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--danger); border-color: #f3cfd1; background: #fff8f8; }
.btn.danger:hover { background: #fdeeee; border-color: #eeb9bc; }
.btn.sm { padding: 6px 11px; font-size: 12.5px; border-radius: 8px; }
.btn.xs { padding: 3px 8px; font-size: 11.5px; border-radius: 6px; }
.btn.block { width: 100%; padding: 11px; font-size: 14.5px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; }

.icon-btn {
    width: 32px; height: 32px; border-radius: 9px; border: 1px solid transparent;
    background: transparent; color: var(--muted); cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 18px; line-height: 1; font-family: inherit;
}
.icon-btn:hover { background: #f2f5fc; color: var(--txt); }
/* 图标按钮里的 SVG 必须限宽，否则会按默认尺寸撑破按钮（移动端菜单 / 关闭按钮） */
.icon-btn svg { width: 18px; height: 18px; flex: 0 0 18px; }
.cal-head .icon-btn svg { width: 16px; height: 16px; flex-basis: 16px; }

/* ---------------- 表单 ---------------- */
.input, select.input, textarea.input {
    width: 100%; padding: 9px 12px; border-radius: 10px;
    border: 1px solid var(--line); background: #fff; color: var(--txt);
    font-size: 13.5px; font-family: inherit; outline: none;
    transition: border-color .15s, box-shadow .15s;
}
.input:focus, select.input:focus, textarea.input:focus {
    border-color: #a9bdf7; box-shadow: 0 0 0 3px rgba(47, 92, 246, .12);
}
textarea.input { resize: vertical; line-height: 1.6; }
select.input {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5L6 8l3.5-3.5' fill='none' stroke='%237b879b' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 12px center;
    padding-right: 32px;
}

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 12.5px; color: var(--txt-2); font-weight: 550; }
.field > span i { color: var(--danger); font-style: normal; }
.field.full { grid-column: 1 / -1; }
.form-tip { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* ---------------- 工具栏 ---------------- */
.toolbar {
    display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
    padding: 12px 14px; margin-bottom: 14px;
}
.toolbar .input { width: auto; min-width: 150px; }
.toolbar .grow { flex: 1; min-width: 180px; }

/* ---------------- 表格 ---------------- */
.table-wrap { width: 100%; overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th {
    text-align: left; font-weight: 600; color: var(--muted);
    font-size: 12.5px; padding: 11px 14px; white-space: nowrap;
    background: #fafbfe; border-bottom: 1px solid var(--line);
}
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #fafbff; }
.table tr.clickable { cursor: pointer; }
.table .cell-main { font-weight: 600; color: var(--txt); }
.table .name-link {
    border: 0; background: none; padding: 0; cursor: pointer;
    font: inherit; font-weight: 650; color: var(--pri-dark); text-align: left;
}
.table .name-link:hover { text-decoration: underline; }
.table-actions { display: flex; gap: 6px; justify-content: flex-end; }

/* ---------------- 标签 ---------------- */
.badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 2px 8px; border-radius: 20px;
    font-size: 11.5px; font-weight: 600; line-height: 1.7;
    background: #f0f3fa; color: var(--txt-2); white-space: nowrap;
}
.badge.blue { background: var(--pri-soft); color: var(--pri-dark); }
.badge.ok { background: #e7f7f0; color: #0b7a53; }
.badge.warn { background: #fdf3e3; color: #a8630f; }
.badge.danger { background: #fdecec; color: #b4292d; }
.badge.gray { background: #f3f5f9; color: #6b7688; }

/* ---------------- 分页 ---------------- */
.pager {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; padding: 12px 16px; border-top: 1px solid var(--line-soft);
    flex-wrap: wrap;
}
.pager-info { font-size: 12.5px; color: var(--muted); }
.pager-btns { display: flex; gap: 6px; align-items: center; }
.pager-btns .btn { min-width: 34px; }
.pager-btns .btn.active { background: var(--pri-soft); border-color: #c9d7fb; color: var(--pri-dark); font-weight: 650; }

/* ---------------- 空状态 ---------------- */
.empty { padding: 44px 20px; text-align: center; color: var(--muted); }
.empty-ico {
    width: 52px; height: 52px; margin: 0 auto 12px; border-radius: 16px;
    background: #f2f5fc; display: flex; align-items: center; justify-content: center;
    color: #b3c0d8;
}
.empty-ico svg { width: 24px; height: 24px; }
.empty p { font-size: 14px; color: var(--txt-2); margin-bottom: 4px; }
.empty span { font-size: 12.5px; }

/* ---------------- 弹窗 ---------------- */
.modal-mask {
    position: fixed; inset: 0; z-index: 100;
    background: rgba(18, 26, 42, .45);
    display: flex; align-items: center; justify-content: center;
    padding: 20px; animation: fadeIn .15s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
    width: 560px; max-width: 100%; max-height: calc(100vh - 40px);
    background: #fff; border-radius: 16px; display: flex; flex-direction: column;
    box-shadow: 0 24px 70px rgba(15, 25, 45, .28);
    animation: popIn .18s cubic-bezier(.2, .9, .3, 1.2);
}
.modal.wide { width: 1000px; }
@keyframes popIn { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
.modal-hd {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px; border-bottom: 1px solid var(--line-soft);
}
.modal-hd h3 { font-size: 16px; }
.modal-bd { padding: 18px 20px; overflow-y: auto; }
.modal-ft {
    display: flex; justify-content: flex-end; gap: 10px;
    padding: 14px 20px; border-top: 1px solid var(--line-soft); background: #fcfdff;
    border-radius: 0 0 16px 16px;
}

/* ---------------- 提示 ---------------- */
.toast-wrap {
    position: fixed; top: 18px; left: 50%; transform: translateX(-50%);
    z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center;
    pointer-events: none; width: max-content; max-width: calc(100% - 32px);
}
.toast {
    padding: 10px 18px; border-radius: 10px; font-size: 13.5px; font-weight: 550;
    background: #1f2733; color: #fff; box-shadow: 0 10px 30px rgba(15, 25, 45, .25);
    animation: toastIn .2s ease;
    max-width: 100%; line-height: 1.55; word-break: break-word;
}
.toast.ok { background: #0f9d6e; }
.toast.err { background: #dc3d43; }
.toast.warn { background: #c97a1c; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* ---------------- 登录 ---------------- */
.auth-page {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    padding: 24px;
    background:
        radial-gradient(1000px 500px at 12% -10%, #e6edff 0%, rgba(230, 237, 255, 0) 60%),
        radial-gradient(900px 480px at 100% 0%, #e9f4ff 0%, rgba(233, 244, 255, 0) 55%),
        var(--bg);
}
.auth-card {
    width: 400px; max-width: 100%;
    background: #fff; border: 1px solid var(--line); border-radius: 20px;
    padding: 32px 30px 26px; box-shadow: 0 20px 60px rgba(23, 43, 77, .1);
}
.auth-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.auth-brand .brand-mark { width: 44px; height: 44px; border-radius: 13px; font-size: 20px; }
.auth-brand h1 { font-size: 18px; }
.auth-brand p { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-form label { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: var(--txt-2); font-weight: 550; }
.auth-form .input { padding: 11px 13px; font-size: 14px; }
.captcha-row { display: flex; gap: 10px; align-items: stretch; }
.captcha-row .input { flex: 1; }
.captcha-row img, .captcha-demo {
    width: 132px; height: 44px; border-radius: 10px; border: 1px solid var(--line);
    cursor: pointer; background: #eef2fb; flex: 0 0 132px; object-fit: cover;
}
.captcha-demo {
    display: flex; align-items: center; justify-content: center;
    font-family: ui-monospace, monospace; font-size: 19px; letter-spacing: 4px;
    font-weight: 700; color: #2f5cf6; user-select: none;
}
.auth-tip { margin-top: 18px; font-size: 12px; color: var(--muted); line-height: 1.7; }
.auth-err {
    background: #fdecec; border: 1px solid #f7c9c9; color: #b4292d;
    padding: 9px 12px; border-radius: 9px; font-size: 12.5px;
}

/* ---------------- 学员详情 / 快捷录入 ---------------- */
.detail-top { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.detail-top .avatar {
    width: 48px; height: 48px; border-radius: 14px; background: var(--pri-soft);
    color: var(--pri-dark); font-size: 20px; font-weight: 700;
    display: flex; align-items: center; justify-content: center; flex: 0 0 48px;
}
.detail-top h4 { font-size: 17px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.kv-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 12px 18px;
    background: #fafbfe; border: 1px solid var(--line-soft); border-radius: 12px;
    padding: 14px 16px; margin-bottom: 18px;
}
.kv-grid > div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.kv-grid > div.full { grid-column: 1 / -1; }
.kv-grid span { font-size: 11.5px; color: var(--muted); }
.kv-grid b { font-size: 13.5px; font-weight: 600; word-break: break-all; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.sec-hd { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; gap: 10px; }
.sec-hd h5 { font-size: 14px; }

.quick-box {
    background: #f6f9ff; border: 1px dashed #c6d5f8; border-radius: 12px;
    padding: 12px 14px; margin-bottom: 16px;
}
.quick-hd { display: flex; align-items: baseline; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.quick-hd b { font-size: 13px; color: var(--pri-dark); }
.quick-hd span { font-size: 11.5px; color: var(--muted); }
.quick-box textarea { margin-bottom: 8px; background: #fff; }

.orders-editor { margin-top: 16px; border-top: 1px dashed var(--line); padding-top: 14px; }
.orders-editor > .sec-hd { margin-bottom: 10px; }
.order-row {
    display: grid; grid-template-columns: 1.25fr .65fr .68fr 1.45fr .85fr .8fr 30px;
    gap: 8px; align-items: center; margin-bottom: 8px;
}
/* 已发货要填单号、部分发货要填本次内容，额外输入框占满一整行 */
.order-row .o-extra { grid-column: 1 / -1; }
.order-row .input { padding: 7px 10px; font-size: 12.5px; }
.order-row .icon-btn { width: 30px; height: 30px; color: #b8545a; }

.total-line {
    display: flex; justify-content: flex-end; gap: 16px;
    padding: 10px 0 2px; font-size: 13px; color: var(--muted);
}
.total-line b { color: var(--pri-dark); font-size: 15px; font-variant-numeric: tabular-nums; }

/* ---------------- 产品/权限表 ---------------- */
.perm-group { margin-bottom: 16px; }
.perm-group h5 { font-size: 13px; color: var(--txt-2); margin-bottom: 8px; }
.perm-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.perm-item {
    display: flex; align-items: flex-start; gap: 8px;
    padding: 9px 11px; border: 1px solid var(--line); border-radius: 10px;
    font-size: 13px; cursor: pointer; background: #fff;
}
.perm-item:hover { border-color: #c9d7fb; background: #fafbff; }
.perm-item input { margin: 2px 0 0; accent-color: var(--pri); }
.perm-item small { display: block; color: var(--muted); font-size: 11px; margin-top: 1px; }

.role-head { display: flex; align-items: center; gap: 8px; }

/* ---------------- 统计条 ---------------- */
.bar { height: 6px; border-radius: 99px; background: #eef1f8; overflow: hidden; min-width: 70px; }
.bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #2f5cf6, #79a1ff); }

.tabs { display: inline-flex; gap: 2px; background: #f2f5fc; padding: 3px; border-radius: 9px; }
.tab {
    border: 0; background: transparent; padding: 5px 12px; border-radius: 7px;
    font-size: 12.5px; color: var(--txt-2); cursor: pointer; font-family: inherit;
}
.tab.active { background: #fff; color: var(--pri-dark); font-weight: 650; box-shadow: 0 1px 3px rgba(23, 43, 77, .1); }

.rank-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line-soft); }
.rank-row:last-child { border-bottom: 0; }
.rank-no {
    width: 22px; height: 22px; border-radius: 7px; background: #f2f5fc; color: var(--txt-2);
    font-size: 11.5px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: 0 0 22px;
}
.rank-no.top { background: var(--pri); color: #fff; }

.recent-item { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line-soft); }
.recent-item:last-child { border-bottom: 0; }
.recent-item .r-main { min-width: 0; flex: 1; }
.recent-item .r-main b { font-size: 13.5px; font-weight: 600; }
.recent-item .r-main div { font-size: 11.5px; color: var(--muted); }

/* ---------------- 移动端 ---------------- */
.bottom-nav { display: none; }
.only-mobile { display: none !important; }

@media (max-width: 1080px) {
    .stat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .grid-2 { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform .22s ease;
        box-shadow: 0 0 60px rgba(15, 25, 45, .2);
        width: 260px; flex-basis: 260px;
    }
    .sidebar.open { transform: none; }
    .main { margin-left: 0; }
    .topbar { padding: 0 14px; height: 56px; flex-basis: 56px; }
    .view { padding: 16px 14px calc(78px + env(safe-area-inset-bottom)); }
    .only-mobile { display: inline-flex !important; }
    .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .stat-value { font-size: 18px; }
    .grid-2 { gap: 12px; }
    .page-head h1 { font-size: 18px; }
    .hide-sm { display: none !important; }

    .bottom-nav {
        display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
        background: rgba(255, 255, 255, .96); border-top: 1px solid var(--line);
        padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
        backdrop-filter: blur(10px);
    }
    .bottom-nav button {
        flex: 1; border: 0; background: none; font-family: inherit;
        display: flex; flex-direction: column; align-items: center; gap: 3px;
        padding: 5px 0; color: var(--muted); font-size: 10.5px; cursor: pointer;
    }
    .bottom-nav button svg { width: 20px; height: 20px; }
    .bottom-nav button.active { color: var(--pri); }

    .modal { width: 100%; border-radius: 16px; }
    .modal-bd { padding: 16px; }
    .form-grid { grid-template-columns: 1fr; }
    .kv-grid { grid-template-columns: 1fr; }
    .order-row { grid-template-columns: 1fr 1fr; }
    .order-row .o-product, .order-row .o-material,
    .order-row .o-date, .order-row .o-extra { grid-column: 1 / -1; }
    .order-row .del-order { justify-self: end; grid-column: 2; }
    .perm-list { grid-template-columns: 1fr; }
    .toolbar .input { min-width: 0; flex: 1 1 46%; }
    .toolbar .grow { flex-basis: 100%; }
    .table th, .table td { padding: 10px 12px; }
    .toast-wrap { top: 10px; }
}

@media (max-width: 420px) {
    .stat-grid { grid-template-columns: 1fr 1fr; }
    .stat-value { font-size: 17px; }
    .auth-card { padding: 24px 20px; }
}


/* ==================================================================
   1.2.0 新增：查重提示 / 学员详情右侧 / 联系计划日历 / 筛选胶囊 / 移动端录入
   ================================================================== */

/* ---------- 查重提示 ---------- */
.dup-hint { margin: 0; }
.dup-hint:not(:empty) { margin: 12px 0 16px; }
.dup-box {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 11px 14px; border-radius: 10px; font-size: 13px; color: #38445a;
    background: #f4f7ff; border: 1px solid #dfe6f8; flex-wrap: wrap;
}
.dup-box .dup-text { min-width: 0; }
.dup-box b { display: block; font-size: 13.5px; margin-bottom: 2px; }
.dup-box .sub { display: block; }
.dup-box.warn { background: #fdf3e3; border-color: #f3dcb8; color: #a8630f; }
.dup-box.ok { background: #e9f8f1; border-color: #bfe9d6; color: #0b7a53; }
/* 查重命中时：整条加框、左侧色条、图标，保证一眼看到 */
.dup-box.big {
    align-items: flex-start; gap: 10px; padding: 13px 15px;
    border-left: 4px solid #2f5cf6; background: #f2f6ff; border-color: #cfdcfb;
    box-shadow: 0 6px 18px rgba(47, 92, 246, .08);
}
.dup-box.big.warn { border-left-color: #e0a03a; background: #fffaf1; border-color: #f3dcb8; }
.dup-box.big .dup-ico {
    flex: 0 0 22px; width: 22px; height: 22px; margin-top: 1px; border-radius: 50%;
    background: #2f5cf6; color: #fff; font-weight: 700; font-size: 13px;
    display: flex; align-items: center; justify-content: center;
}
.dup-box.big.warn .dup-ico { background: #e0a03a; }
.dup-box.big .dup-text { flex: 1; min-width: 200px; }
.dup-box.big .dup-text b { font-size: 14px; }
.dup-box.big .btn { align-self: center; white-space: nowrap; }

/* ---------- 学员详情：左资料 + 右下次联系 ---------- */
.detail-split { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(290px, 1fr); gap: 22px; }
.detail-main { min-width: 0; }
.detail-side { border-left: 1px solid var(--line-soft); padding-left: 20px; min-width: 0; }
.side-hd { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 10px; }
.side-hd h5 { font-size: 13.5px; }
.fu-form { background: #f7f9fd; border: 1px solid #e9edf6; border-radius: 10px; padding: 12px; margin-bottom: 14px; }
.fu-form .field + .field { margin-top: 8px; }
.fu-form .btn.block { margin-top: 10px; }
.fu-list { display: flex; flex-direction: column; gap: 8px; max-height: 330px; overflow-y: auto; }
.fu-item { border: 1px solid var(--line-soft); border-radius: 9px; padding: 9px 10px; background: #fff; }
.fu-item.done { background: #fafbfd; opacity: .72; }
.fu-line { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.fu-time { font-size: 12.5px; font-variant-numeric: tabular-nums; }
.fu-content { font-size: 12.5px; color: #4c586c; margin-top: 4px; line-height: 1.6; word-break: break-word; }
.fu-actions { display: flex; gap: 6px; margin-top: 7px; }

@media (max-width: 980px) {
    .detail-split { grid-template-columns: 1fr; }
    .detail-side { border-left: 0; border-top: 1px solid var(--line-soft); padding-left: 0; padding-top: 16px; }
    .fu-list { max-height: none; }
}

/* ---------- 联系计划日历 ---------- */
.cal-head {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    padding: 14px 18px; border-bottom: 1px solid var(--line-soft);
}
.cal-head b { font-size: 15px; min-width: 104px; }
.cal-head .icon-btn { width: 30px; height: 30px; font-size: 17px; }
.cal-head .chk { margin-left: auto; }
.chk { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--txt-2); cursor: pointer; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; padding: 14px 18px 18px; }
.cal-wd { text-align: center; font-size: 11.5px; color: var(--muted); padding-bottom: 4px; }
.cal-cell {
    position: relative; min-height: 62px; padding: 6px 7px; font-family: inherit;
    display: flex; flex-direction: column; align-items: flex-start;
    border: 1px solid var(--line-soft); border-radius: 9px; background: #fff; cursor: pointer;
}
.cal-cell.blank { border: 0; background: transparent; cursor: default; }
.cal-cell:hover { border-color: #c9d6f7; background: #fafbff; }
.cal-cell.today { border-color: #b9caff; background: #f4f7ff; }
.cal-cell.active { border-color: var(--pri); box-shadow: 0 0 0 2px rgba(47, 92, 246, .16); }
.cal-d { font-size: 12.5px; color: var(--txt-2); font-variant-numeric: tabular-nums; }
.cal-cell.today .cal-d { color: var(--pri); font-weight: 700; }
.cal-dot {
    margin-top: auto; align-self: flex-end; min-width: 18px; height: 18px; padding: 0 5px;
    border-radius: 9px; background: var(--pri); color: #fff;
    font-size: 11px; line-height: 18px; text-align: center; font-weight: 600;
}
.cal-dot.red { background: #e0483f; }
.cal-dot.gray { background: #c3cbd9; }

.cal-row { display: flex; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--line-soft); align-items: flex-start; }
.cal-row:last-child { border-bottom: 0; }
.cal-row.done { opacity: .6; }
.cal-time { flex: 0 0 44px; width: 44px; font-size: 13px; font-weight: 600; color: var(--txt-2); font-variant-numeric: tabular-nums; padding-top: 1px; }
.cal-main { flex: 1; min-width: 0; }
.cal-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.overdue-hd { padding: 9px 18px; background: #fdecec; color: #b4292d; font-size: 12.5px; font-weight: 600; }

/* ---------- 筛选胶囊 / 分类标签 ---------- */
.chips { display: flex; gap: 7px; flex-wrap: wrap; padding: 14px 18px 10px; }
.chip {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 5px 13px; border-radius: 20px; font-family: inherit; font-size: 12.5px;
    border: 1px solid var(--line); background: #fff; color: var(--txt-2); cursor: pointer;
}
.chip:hover { border-color: #c9d6f7; color: var(--pri); }
.chip.active { background: var(--pri); border-color: var(--pri); color: #fff; }
.chip.static { cursor: default; background: #f6f8fd; }
.chip.static b { font-weight: 600; color: var(--txt); }
.chip-x { border: 0; background: none; color: #97a1b3; cursor: pointer; font-size: 12px; line-height: 1; padding: 0 1px; }
.chip-x:hover { color: #e0483f; }

/* ---------- 二维码 ---------- */
.qr-wrap { display: flex; justify-content: center; padding: 8px 0 14px; }
.qr-wrap svg { border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.link-box { display: flex; gap: 8px; }
.link-box .input { flex: 1; min-width: 0; font-size: 12.5px; }

/* ---------- 移动端专属录入页 ---------- */
body.m-mode { background: #f4f6fb; }
body.m-mode .demo-bar { display: none; }
.m-page { max-width: 560px; margin: 0 auto; padding: 14px 14px calc(34px + env(safe-area-inset-bottom)); }
.m-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 2px 2px 14px; }
.m-head b { display: block; font-size: 16.5px; }
.m-head span { font-size: 12px; color: var(--muted); }
.m-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px; box-shadow: 0 8px 24px rgba(23, 43, 77, .05); }
.m-form .field + .field { margin-top: 12px; }
.m-form .input, .m-card .input { font-size: 16px; padding: 11px 12px; }
.m-submit { margin-top: 16px; }
.m-ok {
    background: #e9f8f1; border: 1px solid #bfe9d6; color: #0b7a53;
    border-radius: 10px; padding: 11px 14px; font-size: 13.5px; margin-bottom: 12px;
}

@media (max-width: 620px) {
    .cal-grid { gap: 4px; padding: 10px 12px 14px; }
    .cal-cell { min-height: 52px; padding: 4px 5px; }
    .cal-wd { font-size: 10.5px; }
    .cal-row { padding: 11px 14px; }
    .cal-head { padding: 12px 14px; }
    .cal-head b { min-width: 84px; font-size: 14px; }
    .order-row { grid-template-columns: 1fr 1fr; }
    .order-row .del-order { justify-self: end; }
}

/* ==================================================================
   1.3.0 新增：页签 / 已联系记录 / 上传发货信息 / 更宽的弹窗
   ================================================================== */

/* ---------- 分段页签（联系计划 等） ---------- */
.seg { display: inline-flex; gap: 2px; background: #f2f5fc; padding: 3px; border-radius: 10px; }
.seg-btn {
    border: 0; background: none; padding: 7px 14px; border-radius: 8px;
    font-size: 13px; color: #5a6478; cursor: pointer; font-family: inherit; white-space: nowrap;
}
.seg-btn:hover { color: var(--pri); }
.seg-btn.active { background: #fff; color: var(--pri); font-weight: 600; box-shadow: 0 1px 4px rgba(23, 43, 77, .1); }

/* ---------- 页面内说明条 ---------- */
.tip-line {
    margin-top: 12px; padding: 10px 14px; font-size: 12.5px; line-height: 1.7;
    color: #4c586c; background: #f7f9ff; border: 1px dashed #cfd9f2; border-radius: 10px;
}

/* ---------- 已联系记录列表 ---------- */
.his-list { padding: 0; }
.his-day {
    padding: 8px 18px; font-size: 12.5px; font-weight: 600; color: #5a6478;
    background: #f7f9fd; border-top: 1px solid var(--line-soft);
}
.his-day:first-child { border-top: 0; }
.his-row {
    display: flex; align-items: flex-start; gap: 14px;
    padding: 12px 18px; border-top: 1px solid var(--line-soft);
}
.his-day + .his-row { border-top: 0; }
.his-time { flex: 0 0 48px; font-size: 13px; color: #5a6478; font-variant-numeric: tabular-nums; padding-top: 1px; }
.his-main { flex: 1; min-width: 0; }
.his-owner { flex: 0 0 72px; text-align: right; }
.his-end { padding: 14px; text-align: center; font-size: 12px; color: var(--muted); }

/* ---------- 上传发货信息 ---------- */
.upload-guide { background: #f7f9ff; border: 1px solid #e3eaf9; border-radius: 12px; padding: 14px 16px; }
.upload-guide b { font-size: 13.5px; }
.upload-guide ol { margin: 8px 0 0 18px; padding: 0; font-size: 12.8px; line-height: 1.85; color: #4c586c; }
.upload-guide .sub { display: block; margin-top: 8px; font-size: 12px; }
.or-line { display: flex; align-items: center; gap: 10px; margin: 16px 0 8px; color: #97a1b3; font-size: 12px; }
.or-line::before, .or-line::after { content: ''; flex: 1; height: 1px; background: var(--line); }

.imp-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 14px; }
.imp-stats > div { background: #f6f8fd; border-radius: 10px; padding: 10px 12px; text-align: center; }
.imp-stats b { display: block; font-size: 20px; line-height: 1.3; }
.imp-stats span { font-size: 12px; color: var(--muted); }
.imp-stats .ok b { color: #0b7a53; }
.imp-stats .warn b { color: #a8630f; }
.imp-table { max-height: 46vh; overflow: auto; border: 1px solid var(--line-soft); border-radius: 10px; }

@media (max-width: 620px) {
    .imp-stats { grid-template-columns: repeat(2, 1fr); }
    .his-row { padding: 11px 14px; gap: 10px; }
    .his-time { flex-basis: 40px; font-size: 12.5px; }
    .his-owner { flex-basis: 56px; }
    .seg-btn { padding: 6px 10px; font-size: 12.5px; }
}

/* ==================================================================
   1.4.0：移动端菜单收起 / 数据设置 / 产品分组 / 自定义字段
   ================================================================== */

/* ---------- 移动端侧边菜单 ---------- */
.side-close { margin-left: auto; flex: 0 0 auto; }
.side-mask { display: none; }

@media (max-width: 860px) {
    body.menu-open .side-mask {
        display: block; position: fixed; inset: 0; z-index: 35;
        background: rgba(15, 25, 45, .38);
        -webkit-backdrop-filter: blur(1px); backdrop-filter: blur(1px);
    }
    .sidebar { z-index: 45; }
}

/* ---------- 产品按分类分组 ---------- */
.cat-group-hd {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 14px; background: #f6f8fd; border-top: 1px solid var(--line-soft);
    font-size: 13px; font-weight: 600; color: #38445a;
}
.cat-group-hd:first-child { border-top: 0; }
.cat-group-hd .count { font-weight: 400; color: var(--muted); font-size: 12px; }
.cat-group-hd .spacer { flex: 1; }
.cat-group-empty { padding: 16px 14px; font-size: 12.5px; color: var(--muted); }

/* ---------- 数据设置 ---------- */
.set-block { padding: 4px 0 2px; }
.set-row {
    display: flex; align-items: center; gap: 10px;
    padding: 11px 14px; border-top: 1px solid var(--line-soft);
}
.set-row:first-child { border-top: 0; }
.set-row .set-main { flex: 1; min-width: 0; }
.set-row .set-main b { font-size: 13.5px; }
.set-row .set-main .sub { display: block; margin-top: 2px; }
.set-row .set-ops { display: flex; gap: 6px; flex: 0 0 auto; }
.set-type {
    display: inline-block; padding: 1px 7px; border-radius: 6px; font-size: 11.5px;
    background: #eef2fb; color: #4a5670; margin-left: 6px;
}
.set-empty { padding: 18px 14px; font-size: 12.5px; color: var(--muted); }

/* ---------- 自定义字段（表单/详情） ---------- */
.cf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 2px; }
.cf-grid .cf-full { grid-column: 1 / -1; }
.cf-sec { margin-top: 14px; border-top: 1px dashed var(--line); padding-top: 12px; }
.cf-sec-hd { font-size: 12.5px; font-weight: 600; color: #5a6478; margin-bottom: 8px; }

/* ---------- 增加联系弹窗 ---------- */
.pick-list { max-height: 300px; overflow: auto; border: 1px solid var(--line-soft); border-radius: 10px; }
.pick-row {
    display: flex; align-items: center; gap: 10px; padding: 10px 12px;
    border-top: 1px solid var(--line-soft); cursor: pointer;
}
.pick-row:first-child { border-top: 0; }
.pick-row:hover { background: #f7f9ff; }
.pick-row.active { background: #eef3ff; box-shadow: inset 3px 0 0 var(--pri); }
.pick-row .pick-main { flex: 1; min-width: 0; }
.pick-row .pick-main b { font-size: 13.5px; }
.pick-row .pick-main .sub { display: block; }
.pick-empty { padding: 18px; text-align: center; font-size: 12.5px; color: var(--muted); }
/* ---------- 弹窗里的单选分段（标记发货：已发货 / 部分发货） ---------- */
.seg-radio { display: inline-flex; gap: 2px; background: #f2f5fc; padding: 3px; border-radius: 10px; }
.seg-radio .seg-item { cursor: pointer; }
.seg-radio .seg-item input { position: absolute; opacity: 0; pointer-events: none; }
.seg-radio .seg-item span {
    display: inline-block; padding: 7px 16px; border-radius: 8px;
    font-size: 13px; color: var(--muted); user-select: none; transition: all .15s ease;
}
.seg-radio .seg-item span:hover { color: var(--pri); }
.seg-radio .seg-item input:checked + span {
    background: #fff; color: var(--pri); font-weight: 600;
    box-shadow: 0 1px 4px rgba(23, 43, 77, .1);
}
.seg-radio .seg-item input:focus-visible + span { outline: 2px solid var(--pri); outline-offset: 1px; }

.picked-box {
    display: flex; align-items: center; gap: 10px; padding: 10px 12px; flex-wrap: wrap;
    background: #eef3ff; border: 1px solid #d8e2fb; border-radius: 10px; font-size: 13px;
}
.picked-box .sub { min-width: 0; word-break: break-all; }
.picked-box .spacer { flex: 1; }

/* ---------- 发货弹窗里的收件信息（可直接改，同步回学员资料） ---------- */
.ship-addr {
    padding: 12px; border: 1px solid var(--line); border-radius: 12px;
    background: #f8fafd;
}
.ship-addr-hd {
    display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
    margin-bottom: 10px;
}
.ship-addr-hd b { font-size: 13px; }
.ship-addr-hd .muted { font-size: 12px; }
.ship-addr .form-grid { gap: 10px 12px; }
.addr-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px 12px; margin-top: 10px; }
.ship-addr .form-tip { margin-top: 8px; }
@media (max-width: 620px) {
    .addr-3 { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
    .cf-grid { grid-template-columns: 1fr; }
    .set-row { flex-wrap: wrap; }
    .set-row .set-ops { width: 100%; justify-content: flex-end; }
}

.cat-row td {
    background: #f6f8fd; font-size: 13px; font-weight: 600; color: #38445a;
    padding: 9px 14px; border-top: 1px solid var(--line-soft);
}
.cat-row:first-child td { border-top: 0; }
.cat-row .count { margin-left: 8px; font-weight: 400; font-size: 12px; color: var(--muted); }

/* ==================================================================
   1.5.0：控件样式统一（下拉 / 按钮 / 文件选择 / 复选框 / 分段页签）
   目标：同一个控件在全站只有一种长相，不出现「原生控件」突突的角落
   ================================================================== */

/* ---------- 下拉框：和文本框等高、禁用态可辨认 ---------- */
select.input {
    line-height: 1.5;
    text-overflow: ellipsis;
}
/* 局部收紧了 padding 的地方（订单行 / 移动端卡片），右侧要留出箭头的位置 */
.order-row select.input,
.m-card select.input,
.m-form select.input { padding-right: 30px; }
.order-row select.input { background-position: right 9px center; }
/* 收款行是紧凑布局，日期框不要跟着长高 */
.order-row .input[type="date"] { min-height: 32px; }
select.input:disabled,
.input:disabled,
textarea.input:disabled {
    background: #f7f8fb;
    color: var(--muted);
    cursor: not-allowed;
    -webkit-text-fill-color: var(--muted);
    opacity: 1;
}
select.input:disabled { background-image: none; padding-right: 12px; }

/* ---------- 日期 / 时间：避免和文本框高度不一致 ---------- */
.input[type="date"],
.input[type="time"],
.input[type="datetime-local"],
.input[type="month"] { min-height: 38px; }
.input[type="date"]::-webkit-calendar-picker-indicator,
.input[type="datetime-local"]::-webkit-calendar-picker-indicator,
.input[type="time"]::-webkit-calendar-picker-indicator { opacity: .55; cursor: pointer; }
.input[type="date"]::-webkit-calendar-picker-indicator:hover,
.input[type="datetime-local"]::-webkit-calendar-picker-indicator:hover { opacity: .85; }

/* ---------- 文件选择（上传发货信息） ---------- */
.input[type="file"] {
    padding: 6px 10px;
    cursor: pointer;
    line-height: 1.5;
}
.input[type="file"]::file-selector-button,
.input[type="file"]::-webkit-file-upload-button {
    margin-right: 10px;
    padding: 5px 12px;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: #f6f8fd;
    color: var(--txt-2);
    font-size: 12.5px;
    font-family: inherit;
    cursor: pointer;
    transition: background .15s, border-color .15s, color .15s;
}
.input[type="file"]::file-selector-button:hover,
.input[type="file"]::-webkit-file-upload-button:hover {
    background: #eef2fb;
    border-color: #c9d7fb;
    color: var(--pri-dark);
}

/* ---------- 复选框 / 单选框：统一主色与尺寸 ---------- */
input[type="checkbox"],
input[type="radio"] {
    accent-color: var(--pri);
    width: 15px;
    height: 15px;
    margin: 0;
    flex: 0 0 auto;
    cursor: pointer;
}
.chk { padding: 1px 0; }
.chk input { margin-top: 0; }
.perm-item input { margin: 1px 0 0; }

/* ---------- 分段页签：.tabs/.tab 与 .seg/.seg-btn 视觉一致 ---------- */
.tabs { border-radius: 10px; }
.tab {
    padding: 7px 14px;
    border-radius: 8px;
    font-size: 13px;
    color: #5a6478;
}
.tab:hover { color: var(--pri); }
.tab.active { color: var(--pri); font-weight: 600; }

/* ---------- 代码片段（系统升级页的说明文字里用到） ---------- */
code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12.5px;
    background: #f2f5fc;
    border-radius: 5px;
    padding: 1px 5px;
    color: #38445a;
}

/* ---------- 三列统计（销售记录页只有 3 张卡） ---------- */
.stat-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* ---------- 键盘焦点可见（不改变鼠标点击时的观感） ---------- */
.btn:focus-visible,
.icon-btn:focus-visible,
.chip:focus-visible,
.tab:focus-visible,
.seg-btn:focus-visible,
.nav-item:focus-visible,
.cal-cell:focus-visible,
.name-link:focus-visible {
    outline: 2px solid rgba(47, 92, 246, .45);
    outline-offset: 2px;
}

/* ---------- 说明性区块统一（提示条 / 上传说明） ---------- */
.tip-line, .upload-guide { border-radius: 12px; }
.upload-guide .sub:last-child { margin-bottom: 0; }

@media (max-width: 1080px) {
    .stat-grid.cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 460px) {
    .stat-grid.cols-3 { grid-template-columns: 1fr; }
    .input[type="file"]::file-selector-button { margin-right: 8px; padding: 4px 10px; }
}

/* ---------- 常用应用（小应用卡片） ---------- */
.app-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 14px;
    margin-top: 16px;
}
.app-card {
    display: flex;
    gap: 12px;
    padding: 16px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.app-ico {
    flex: 0 0 auto;
    width: 40px; height: 40px;
    border-radius: 11px;
    background: var(--pri-soft);
    color: var(--pri-dark);
    display: flex; align-items: center; justify-content: center;
}
.app-ico svg { width: 21px; height: 21px; }
.app-main { flex: 1; min-width: 0; }
.app-main h4 { font-size: 14.5px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.app-desc { margin-top: 3px; font-size: 12.5px; color: var(--muted); line-height: 1.65; }
.app-url { display: flex; gap: 6px; margin-top: 11px; }
.app-url .input { flex: 1; min-width: 0; font-size: 12px; padding: 7px 10px; }
.app-acts { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 9px; }
.app-acts-sep { width: 1px; height: 16px; background: var(--line); margin: 0 2px; }

@media (max-width: 560px) {
    .app-grid { grid-template-columns: 1fr; }
    .app-url { flex-direction: column; }
    .app-url .btn { width: 100%; }
}

/* ---------- 兑换码：领码卡片 ---------- */
.code-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
    gap: 14px;
}
.code-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px 16px 14px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.code-card-hd { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.code-card-hd h4 { font-size: 15px; line-height: 1.45; }
.code-desc { font-size: 12.5px; color: var(--muted); line-height: 1.65; margin: 0; min-height: 20px; }
.code-meta {
    font-size: 12.5px;
    color: var(--pri-dark);
    background: var(--pri-soft);
    border-radius: 7px;
    padding: 6px 10px;
}
.code-claim-btn { width: 100%; justify-content: center; margin-top: auto; }

.code-big {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 21px;
    font-weight: 700;
    letter-spacing: .06em;
    text-align: center;
    word-break: break-all;
    padding: 18px 14px;
    border-radius: 11px;
    background: var(--pri-soft);
    color: var(--pri-dark);
    user-select: all;
}
.code-acts { display: flex; gap: 8px; margin-top: 14px; }
.code-acts .btn { flex: 1; justify-content: center; }

.code-bar {
    height: 6px;
    border-radius: 99px;
    background: #eef1f8;
    overflow: hidden;
    margin-bottom: 5px;
}
.code-bar > i { display: block; height: 100%; background: var(--pri); border-radius: 99px; }

.code-pool-info {
    display: flex;
    gap: 26px;
    flex-wrap: wrap;
    padding: 0 2px 12px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 10px;
}
.code-pool-info > div { display: flex; flex-direction: column; gap: 3px; }
.code-pool-info span { font-size: 12px; color: var(--muted); }
.code-pool-info b { font-size: 14px; }
.code-pool-table { max-height: 46vh; overflow: auto; }

/* ---------- 兑换码：额度矩阵 ---------- */
.quota-table th, .quota-table td { vertical-align: top; }
.quota-table th { white-space: nowrap; }
.quota-table .quota-name {
    position: sticky;
    left: 0;
    background: var(--card);
    min-width: 132px;
    z-index: 1;
}
.quota-table th.quota-name { background: #fafbfe; }
.quota-table .quota-cell { min-width: 116px; }
.quota-input {
    width: 92px;
    padding: 6px 9px;
    font-size: 13px;
    text-align: center;
}
.quota-cell .sub { margin-top: 3px; }

@media (max-width: 560px) {
    .code-grid { grid-template-columns: 1fr; }
    .code-acts { flex-direction: column; }
}

/* ---------- 消息推送：工作台滚动播报 ---------- */
.push-ticker {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    background: linear-gradient(90deg, #eef3ff, #f8faff 55%, #eef3ff);
    border: 1px solid #dbe5fb;
    border-radius: 12px;
    padding: 9px 14px;
}
.push-ticker-ico {
    flex: 0 0 auto;
    width: 30px; height: 30px;
    border-radius: 9px;
    background: #fff;
    border: 1px solid #d3defa;
    color: var(--pri);
    display: flex; align-items: center; justify-content: center;
}
.push-ticker-ico svg { width: 16px; height: 16px; }
.push-ticker-win {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 3%, #000 97%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 3%, #000 97%, transparent);
}
.push-ticker-track {
    display: inline-flex;
    gap: 44px;
    white-space: nowrap;
    animation: pushScroll 26s linear infinite;
    will-change: transform;
}
@keyframes pushScroll {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}
.push-ticker:hover .push-ticker-track { animation-play-state: paused; }
.push-ticker-item { font-size: 13px; color: var(--txt-2); }
.push-ticker-time {
    font-style: normal;
    font-size: 12px;
    color: var(--muted);
    margin-left: 8px;
    font-variant-numeric: tabular-nums;
}
.push-ticker .btn { flex: 0 0 auto; }

/* ---------- 消息推送：配置页 ---------- */
.push-params { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.push-preview {
    margin-top: 10px;
    padding: 10px 12px;
    background: #f7f9ff;
    border: 1px dashed #cfd9f2;
    border-radius: 10px;
    font-size: 13px;
    color: var(--txt-2);
    line-height: 1.7;
    min-height: 20px;
    word-break: break-all;
}
.push-preview-msg { color: var(--txt); }
.push-scope-box {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 18px;
    margin-top: 10px;
    padding: 12px 14px;
    background: #f9fafd;
    border: 1px solid var(--line-soft);
    border-radius: 10px;
    max-height: 220px;
    overflow: auto;
}
.push-scope-box .perm-item { width: auto; }
.push-scope-box .perm-item span small { margin-left: 6px; }
@media (max-width: 560px) {
    .push-ticker { gap: 8px; padding: 8px 10px; }
    .push-ticker-track { animation-duration: 32s !important; }
}
