/* ============================================================
   校园跑代跑 · 公共样式（深色极简）
   ============================================================ */

:root {
    --bg: #0a0a0b;
    --card: #121214;
    --card2: #17171a;
    --line: #26262b;
    --line2: #333339;
    --ink: #f4f4f5;
    --ink2: #a1a1aa;
    --ink3: #71717a;
    --ok: #22c55e;
    --warn: #eab308;
    --run: #3b82f6;
    --bad: #ef4444;
    --r: 12px;
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html,
body {
    margin: 0;
    padding: 0;
}

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

a {
    color: inherit;
    text-decoration: none;
}

/* ---------- 布局 ---------- */
.wrap {
    max-width: 920px;
    margin: 0 auto;
    padding: 0 16px 64px;
}

.narrow {
    max-width: 420px;
}

/* ---------- 顶栏 ---------- */
.top {
    position: sticky;
    top: 0;
    z-index: 30;
    background: rgba(10, 10, 11, .92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
}

.top-in {
    max-width: 920px;
    margin: 0 auto;
    height: 56px;
    padding: 0 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: .3px;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.logo-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--ok);
    box-shadow: 0 0 10px rgba(34, 197, 94, .7);
}

.nav {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav a {
    color: var(--ink2);
    padding: 7px 11px;
    border-radius: 8px;
    font-size: 13px;
    transition: .15s;
}

.nav a:hover {
    color: var(--ink);
    background: var(--card2);
}

.nav a.on {
    color: var(--ink);
    background: var(--card2);
}

/* ---------- 卡片 ---------- */
.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--r);
    padding: 20px;
}

.card + .card {
    margin-top: 12px;
}

.card-h {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.card-t {
    font-size: 15px;
    font-weight: 600;
}

.card-sub {
    color: var(--ink3);
    font-size: 12.5px;
}

/* ---------- 标题 ---------- */
.h1 {
    font-size: 26px;
    font-weight: 700;
    line-height: 1.3;
    margin: 28px 0 8px;
    letter-spacing: -.2px;
}

.h2 {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 12px;
}

.p {
    color: var(--ink2);
    margin: 0 0 20px;
    font-size: 13.5px;
}

/* ---------- 表单 ---------- */
.field {
    margin-bottom: 14px;
}

.label {
    display: block;
    font-size: 12.5px;
    color: var(--ink2);
    margin-bottom: 7px;
}

.input,
.select,
.textarea {
    width: 100%;
    background: var(--card2);
    border: 1px solid var(--line2);
    border-radius: 9px;
    color: var(--ink);
    padding: 11px 12px;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: .15s;
}

.input::placeholder,
.textarea::placeholder {
    color: var(--ink3);
}

.input:focus,
.select:focus,
.textarea:focus {
    border-color: #4b4b55;
    background: #1b1b1f;
}

.textarea {
    resize: vertical;
    min-height: 74px;
}

.select {
    appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'><path d='M2 4l4 4 4-4' stroke='%2371717a' stroke-width='1.5' fill='none' stroke-linecap='round'/></svg>");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}

.pwd-wrap {
    position: relative;
}

.pwd-wrap .input {
    padding-right: 44px;
}

.eye {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border: 0;
    background: none;
    color: var(--ink3);
    cursor: pointer;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.eye:hover {
    color: var(--ink);
    background: #202025;
}

.row {
    display: flex;
    gap: 10px;
}

.row > * {
    flex: 1;
    min-width: 0;
}

.row .code-row {
    flex: 0 0 auto;
    display: flex;
    gap: 8px;
}

.code-row .input {
    flex: 1;
}

/* ---------- 按钮 ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: 1px solid var(--line2);
    background: var(--card2);
    color: var(--ink);
    padding: 10px 16px;
    border-radius: 9px;
    font-size: 13.5px;
    font-family: inherit;
    cursor: pointer;
    transition: .15s;
    white-space: nowrap;
}

.btn:hover {
    border-color: #43434c;
    background: #1e1e23;
}

.btn:active {
    transform: scale(.985);
}

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

.btn-p {
    background: var(--ink);
    color: #0a0a0b;
    border-color: var(--ink);
    font-weight: 600;
}

.btn-p:hover {
    background: #e4e4e7;
    border-color: #e4e4e7;
}

.btn-block {
    width: 100%;
}

.btn-sm {
    padding: 7px 11px;
    font-size: 12.5px;
    border-radius: 8px;
}

.btn-ghost {
    background: transparent;
    border-color: var(--line);
}

.btn-danger {
    color: var(--bad);
    border-color: #3d2224;
    background: #1a1214;
}

.btn-danger:hover {
    border-color: #5a2b2f;
    background: #231618;
}

/* ---------- 人机校验（算术题） ---------- */
.cap-q {
    flex: 0 0 auto;
    min-width: 96px;
    padding: 0 4px;
    font-size: 17px;
    font-weight: 600;
    letter-spacing: 1px;
    color: var(--text);
    text-align: center;
    white-space: nowrap;
}

/* ---------- 里程选择 ---------- */
.km-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.km {
    position: relative;
    text-align: center;
    padding: 16px 8px;
    border: 1px solid var(--line2);
    border-radius: 10px;
    background: var(--card2);
    cursor: pointer;
    transition: .15s;
    user-select: none;
}

.km:hover {
    border-color: #43434c;
}

.km.on {
    border-color: var(--ink);
    background: #1d1d21;
}

.km-n {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.2;
}

.km-n small {
    font-size: 12px;
    font-weight: 500;
    color: var(--ink2);
    margin-left: 2px;
}

.km-p {
    color: var(--ink2);
    font-size: 12.5px;
    margin-top: 4px;
}

.km.on .km-p {
    color: var(--ok);
}

/* ---------- 标签 ---------- */
.tag {
    display: inline-flex;
    align-items: center;
    font-size: 11.5px;
    padding: 3px 8px;
    border-radius: 6px;
    border: 1px solid transparent;
    line-height: 1.5;
    white-space: nowrap;
}

.t-wait {
    color: var(--warn);
    background: rgba(234, 179, 8, .1);
    border-color: rgba(234, 179, 8, .22);
}

.t-run {
    color: var(--run);
    background: rgba(59, 130, 246, .1);
    border-color: rgba(59, 130, 246, .22);
}

.t-done {
    color: var(--ok);
    background: rgba(34, 197, 94, .1);
    border-color: rgba(34, 197, 94, .22);
}

.t-bad {
    color: var(--bad);
    background: rgba(239, 68, 68, .1);
    border-color: rgba(239, 68, 68, .22);
}

.t-gray {
    color: var(--ink3);
    background: #1a1a1e;
    border-color: var(--line2);
}

/* ---------- 订单列表 ---------- */
.order {
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--card2);
    padding: 14px 16px;
    margin-bottom: 10px;
}

.order:last-child {
    margin-bottom: 0;
}

.order-top {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.order-no {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 12px;
    color: var(--ink3);
}

.order-title {
    font-weight: 600;
    font-size: 14px;
}

.order-meta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 9px;
    font-size: 12.5px;
    color: var(--ink2);
}

.order-meta b {
    color: var(--ink);
    font-weight: 500;
}

.order-act {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
}

.order-act:empty {
    display: none;
}

.price {
    margin-left: auto;
    font-weight: 700;
    font-size: 15px;
}

/* ---------- 空状态 ---------- */
.empty {
    text-align: center;
    padding: 40px 16px;
    color: var(--ink3);
    font-size: 13px;
}

/* ---------- 弹层 ---------- */
.mask {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .62);
    backdrop-filter: blur(3px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    z-index: 100;
}

.mask.on {
    display: flex;
}

.modal {
    width: 100%;
    max-width: 380px;
    background: var(--card);
    border: 1px solid var(--line2);
    border-radius: 14px;
    padding: 22px;
    animation: pop .18s ease;
}

@keyframes pop {
    from {
        opacity: 0;
        transform: translateY(8px) scale(.98);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

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

.modal p {
    color: var(--ink2);
    font-size: 13px;
    margin: 0 0 16px;
    line-height: 1.6;
}

.modal-act {
    display: flex;
    gap: 8px;
    margin-top: 16px;
}

.modal-act .btn {
    flex: 1;
}

/* ---------- 支付方式 ---------- */
.pay-item {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--line2);
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 8px;
    cursor: pointer;
    background: var(--card2);
    transition: .15s;
}

.pay-item:hover {
    border-color: #43434c;
}

.pay-item.on {
    border-color: var(--ink);
    background: #1d1d21;
}

.pay-ico {
    width: 26px;
    height: 26px;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    flex: 0 0 auto;
}

.pay-ico.ali {
    background: #1677ff;
    color: #fff;
}

.pay-ico.wx {
    background: #07c160;
    color: #fff;
}

.pay-radio {
    margin-left: auto;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 1px solid var(--line2);
    flex: 0 0 auto;
}

.pay-item.on .pay-radio {
    border-color: var(--ink);
    background: radial-gradient(circle, var(--ink) 0 4px, transparent 4.5px);
}

.pay-amount {
    text-align: center;
    font-size: 30px;
    font-weight: 700;
    margin: 6px 0 18px;
    letter-spacing: -.5px;
}

/* ---------- 人工收款：收款码 + 上传截图 ---------- */
.pay-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.pay-badge {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    flex: 0 0 auto;
}

.pay-badge.ali {
    background: #1677ff;
}

.pay-badge.wx {
    background: #07c160;
}

.pay-qr {
    display: block;
    width: 100%;
    max-width: 260px;
    margin: 0 auto 12px;
    border-radius: 12px;
    background: #fff;
    padding: 8px;
    box-sizing: border-box;
}

.pay-acct {
    text-align: center;
    font-size: 13px;
    color: var(--ink2);
    margin-bottom: 12px;
}

.pay-no {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    background: var(--card2);
    border: 1px solid var(--line2);
    border-radius: 9px;
    padding: 9px 11px;
    font-size: 12.5px;
    color: var(--ink2);
    margin-bottom: 10px;
}

.pay-no code {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    color: var(--ink);
    font-size: 13px;
}

.pay-no .btn {
    margin-left: auto;
}

.pay-switch {
    display: flex;
    gap: 8px;
    margin: 12px 0;
}

.pay-proof {
    border-top: 1px solid var(--line);
    margin-top: 14px;
    padding-top: 14px;
}

.file-box {
    display: block;
    border: 1px dashed var(--line2);
    border-radius: 10px;
    padding: 18px 12px;
    text-align: center;
    font-size: 12.5px;
    color: var(--ink3);
    cursor: pointer;
    transition: .15s;
    word-break: break-all;
}

.file-box:hover {
    border-color: #43434c;
    color: var(--ink2);
}

/* 后台：付款截图缩略图 */
.proof-thumb {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    font-size: 12px;
    color: var(--ink3);
    text-decoration: none;
}

.proof-thumb img {
    width: 54px;
    height: 54px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--line2);
    background: #fff;
}

.qr-prev {
    display: block;
    width: 110px;
    height: 110px;
    object-fit: contain;
    background: #fff;
    border-radius: 9px;
    border: 1px solid var(--line2);
    margin-bottom: 8px;
}

/* ---------- 提示条 ---------- */
.tip {
    display: flex;
    gap: 9px;
    align-items: flex-start;
    background: #15161a;
    border: 1px solid var(--line);
    border-radius: 9px;
    padding: 11px 13px;
    font-size: 12.5px;
    color: var(--ink2);
    line-height: 1.6;
    margin-bottom: 14px;
}

.tip-ico {
    flex: 0 0 auto;
    color: var(--run);
    font-size: 13px;
    line-height: 1.5;
}

.tip.warn {
    background: #1a1710;
    border-color: #33290f;
    color: #d4bb7a;
}

.tip.warn .tip-ico {
    color: var(--warn);
}

/* ---------- 表单内联提示 ---------- */
.hint {
    font-size: 12px;
    color: var(--ink3);
    margin-top: 6px;
}

.err {
    font-size: 12.5px;
    color: var(--bad);
    margin-top: 6px;
    display: none;
}

.err.on {
    display: block;
}

/* ---------- 数据条 ---------- */
.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.stat {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 14px 16px;
}

.stat-n {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
}

.stat-n small {
    font-size: 12px;
    font-weight: 500;
    color: var(--ink2);
    margin-left: 2px;
}

.stat-l {
    font-size: 12px;
    color: var(--ink3);
    margin-top: 2px;
}

/* ---------- 底部 ---------- */
.footer {
    text-align: center;
    color: var(--ink3);
    font-size: 12px;
    padding: 28px 16px 12px;
    line-height: 1.9;
}

/* ---------- 分段切换 ---------- */
.seg {
    display: inline-flex;
    background: var(--card2);
    border: 1px solid var(--line);
    border-radius: 9px;
    padding: 3px;
    gap: 3px;
}

.seg button {
    border: 0;
    background: none;
    color: var(--ink2);
    font-family: inherit;
    font-size: 13px;
    padding: 6px 14px;
    border-radius: 7px;
    cursor: pointer;
    transition: .15s;
}

.seg button.on {
    background: #26262b;
    color: var(--ink);
}

/* ---------- 表格 ---------- */
.tbl-wrap {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 10px;
}

.tbl {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    min-width: 640px;
}

.tbl th,
.tbl td {
    text-align: left;
    padding: 11px 13px;
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
}

.tbl th {
    color: var(--ink3);
    font-weight: 500;
    font-size: 12px;
    background: #141417;
}

.tbl tr:last-child td {
    border-bottom: 0;
}

.tbl td.wrap-cell {
    white-space: normal;
    min-width: 160px;
}

.mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 12.5px;
}

/* ---------- toast ---------- */
#toast {
    position: fixed;
    left: 50%;
    bottom: 40px;
    transform: translate(-50%, 20px);
    background: #1e1e23;
    border: 1px solid var(--line2);
    color: var(--ink);
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 13px;
    opacity: 0;
    pointer-events: none;
    transition: .22s;
    z-index: 200;
    max-width: 88vw;
    text-align: center;
}

#toast.on {
    opacity: 1;
    transform: translate(-50%, 0);
}

.hidden {
    display: none !important;
}

/* ============================================================
   聊天 / 客服
   ============================================================ */
.av {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    font-size: 12px;
    color: var(--ink2);
}

.av svg {
    width: 100%;
    height: 100%;
    display: block;
    border-radius: 50%;
}

.av-sm {
    width: 40px;
    height: 40px;
}

.av-me {
    background: #26262b;
    color: var(--ink);
    font-weight: 600;
    border: 1px solid var(--line2);
}

.av-agent {
    background: #1e2a44;
    border: 1px solid #2c3e66;
    font-size: 13px;
    color: #9db8ea;
}

.av-agent::after {
    content: "客";
}

.av-badge {
    position: absolute;
    right: -2px;
    bottom: -2px;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: var(--ok);
    color: #05240f;
    font-size: 9px;
    font-style: normal;
    line-height: 15px;
    text-align: center;
    box-shadow: 0 0 0 2px var(--bg);
}

.chat-wrap {
    max-width: 720px;
    padding-bottom: 96px;
}

.chat-shell {
    margin-top: 14px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--r);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 56px - 150px);
    min-height: 380px;
}

.chat-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--line);
    background: var(--card2);
}

.chat-name {
    font-weight: 600;
    font-size: 14px;
}

.chat-state {
    font-size: 11.5px;
    color: var(--ink3);
    display: flex;
    align-items: center;
    gap: 5px;
}

.chat-state::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--ok);
}

.chat-body {
    flex: 1;
    overflow-y: auto;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.day {
    align-self: center;
    font-size: 11px;
    color: var(--ink3);
    background: #141417;
    border: 1px solid var(--line);
    padding: 2px 10px;
    border-radius: 20px;
}

.chat-empty {
    margin: auto;
    color: var(--ink3);
    font-size: 13px;
    text-align: center;
    padding: 30px 0;
}

.msg {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    max-width: 100%;
}

.msg-out {
    flex-direction: row-reverse;
}

.msg-new {
    animation: msgIn .22s ease-out;
}

@keyframes msgIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
}

.bubble-wrap {
    max-width: 76%;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.msg-out .bubble-wrap {
    align-items: flex-end;
}

.msg-who {
    font-size: 11px;
    color: var(--ink3);
    padding-left: 2px;
}

.bubble {
    padding: 9px 12px;
    border-radius: 14px;
    font-size: 13.5px;
    line-height: 1.65;
    word-break: break-word;
    white-space: pre-wrap;
}

.bubble-in {
    background: var(--card2);
    border: 1px solid var(--line);
    border-top-left-radius: 5px;
}

.bubble-out {
    background: #f4f4f5;
    color: #111114;
    border-top-right-radius: 5px;
}

.msg-time {
    font-size: 10.5px;
    color: var(--ink3);
    padding: 0 3px;
}

.chat-notice {
    margin: 10px 14px 0;
    padding: 8px 12px;
    border-radius: 10px;
    background: rgba(59, 130, 246, .12);
    border: 1px solid rgba(59, 130, 246, .35);
    color: #bcd4ff;
    font-size: 12.5px;
    animation: msgIn .22s ease-out;
}

.chat-notice b {
    color: #fff;
    margin-right: 4px;
}

.chat-notice a {
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 2px;
    margin-left: 6px;
}

.chat-quick {
    display: flex;
    gap: 8px;
    padding: 8px 14px 0;
    overflow-x: auto;
    scrollbar-width: none;
}

.chat-quick::-webkit-scrollbar {
    display: none;
}

.chip {
    flex: 0 0 auto;
    border: 1px solid var(--line2);
    background: #141417;
    color: var(--ink2);
    font-family: inherit;
    font-size: 12.5px;
    padding: 6px 12px;
    border-radius: 20px;
    cursor: pointer;
    transition: .15s;
    white-space: nowrap;
}

.chip:active {
    background: #26262b;
    color: var(--ink);
}

/* 转人工这类「主推」快捷按钮 */
.chip-hot {
    border-color: #4a4a55;
    background: #1d1d22;
    color: var(--ink);
}

/* QQ 转人工弹层 */
.qq-box {
    border: 1px solid var(--line2);
    border-radius: 12px;
    background: var(--card2);
    padding: 14px;
    text-align: center;
}

.qq-num {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: .5px;
    margin-bottom: 12px;
    user-select: all;
    -webkit-user-select: all;
}

.chat-input {
    display: flex;
    gap: 8px;
    padding: 10px 14px 12px;
    border-top: 1px solid var(--line);
    background: var(--card2);
    align-items: center;
}

.chat-input .input {
    flex: 1;
    border-radius: 20px;
    background: #101013;
}

.chat-input .btn {
    border-radius: 20px;
    padding: 9px 18px;
}

.dots {
    display: inline-flex;
    gap: 3px;
    align-items: center;
    height: 18px;
}

.dots i {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--ink3);
    animation: dot 1.2s infinite ease-in-out;
}

.dots i:nth-child(2) {
    animation-delay: .15s;
}

.dots i:nth-child(3) {
    animation-delay: .3s;
}

@keyframes dot {
    0%, 60%, 100% {
        opacity: .3;
        transform: translateY(0);
    }

    30% {
        opacity: 1;
        transform: translateY(-3px);
    }
}

/* ---------- 我的 ---------- */
.me-head {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 16px;
}

.me-av {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: var(--card2);
    border: 1px solid var(--line2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
}

.me-name {
    font-size: 17px;
    font-weight: 700;
}

.me-sub {
    font-size: 12px;
    color: var(--ink3);
    margin-top: 2px;
}

.me-list {
    border: 1px solid var(--line);
    border-radius: var(--r);
    overflow: hidden;
    background: var(--card);
}

.me-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
    color: var(--ink);
}

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

.me-row:active {
    background: var(--card2);
}

.me-row .me-ico {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    background: var(--card2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ink2);
}

.me-row .me-ico svg {
    width: 16px;
    height: 16px;
}

.me-row .me-arrow {
    margin-left: auto;
    color: var(--ink3);
    font-size: 16px;
}

.me-row .me-badge {
    margin-left: auto;
    background: var(--bad);
    color: #fff;
    font-size: 11px;
    padding: 1px 7px;
    border-radius: 20px;
}

/* ---------- 截图 ---------- */
.shot-thumb {
    display: block;
    margin-top: 10px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: #0d0d10;
    overflow: hidden;
    position: relative;
}

.shot-thumb img {
    display: block;
    width: 100%;
    max-height: 320px;
    object-fit: contain;
}

.shot-thumb .shot-mini {
    position: absolute;
    left: 8px;
    bottom: 8px;
    padding: 2px 8px;
    border-radius: 20px;
    background: rgba(10, 10, 11, .72);
    color: var(--ink2);
    font-size: 11px;
    backdrop-filter: blur(4px);
}

.shot-thumb-img {
    display: block;
    max-height: 200px;
    max-width: 100%;
    border-radius: 10px;
    border: 1px solid var(--line);
}

.file-pick {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 6px;
    padding: 22px 18px;
    border: 1px dashed var(--line2);
    border-radius: 10px;
    color: var(--ink3);
    font-size: 12.5px;
    cursor: pointer;
    background: #0f0f12;
    text-align: center;
}

.file-pick:hover {
    border-color: var(--ink3);
    color: var(--ink2);
}

.file-pick input[type=file] {
    display: none;
}

/* ---------- 后台会话 ---------- */
.adm-chat {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 12px;
    align-items: start;
}

.adm-threads {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
    max-height: 620px;
    overflow-y: auto;
}

.adm-thread {
    display: block;
    padding: 12px 14px;
    border-bottom: 1px solid var(--line);
    color: var(--ink2);
    text-decoration: none;
}

.adm-thread:last-child {
    border-bottom: 0;
}

.adm-thread:hover {
    background: var(--card2);
}

.adm-thread.on {
    background: var(--card2);
    box-shadow: inset 2px 0 0 var(--ink);
}

.adm-thread-top {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--ink);
    font-size: 13.5px;
}

.adm-dot {
    margin-left: auto;
    background: var(--bad);
    color: #fff;
    font-size: 10.5px;
    font-style: normal;
    padding: 1px 6px;
    border-radius: 20px;
}

.adm-thread-sub {
    margin-top: 3px;
    font-size: 12px;
    color: var(--ink3);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.adm-thread-time {
    margin-top: 3px;
    font-size: 11px;
    color: var(--ink3);
}

.adm-chat-main {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 14px;
}

.adm-chat-head {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line);
}

.adm-chat-orders {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    padding: 10px 0;
}

.adm-chat-body {
    height: 380px;
    overflow-y: auto;
    padding: 10px 2px;
}

.adm-reply {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 10px;
    border-top: 1px solid var(--line);
}

.adm-reply .textarea {
    width: 100%;
    resize: none;
}

/* 气泡里的图片与工具条（微信式） */
.bubble-img {
    display: block;
    max-width: 200px;
    line-height: 0;
}

.bubble-img img {
    max-width: 100%;
    max-height: 240px;
    border-radius: 10px;
    display: block;
}

.bubble-txt + .bubble-img {
    margin-top: 6px;
}

.bubble:has(.bubble-img) {
    padding: 5px;
}

/* ---------- 微信式聊天：页头 / 输入条 / 长按菜单 ---------- */
.page-im {
    padding-bottom: 0;
}

.chat-name {
    display: flex;
    align-items: center;
    gap: 6px;
}

.chat-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 9px;
    font-size: 20px;
    line-height: 1;
    color: var(--ink2);
    border: 1px solid var(--line);
}

.chat-input {
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px 10px calc(10px + env(safe-area-inset-bottom));
}

.chat-input textarea.input {
    resize: none;
    height: 38px;
    max-height: 110px;
    padding: 8px 12px;
    line-height: 1.5;
    font-family: inherit;
    overflow-y: auto;
}

.ci-tool {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid var(--line2);
    background: #141417;
    color: var(--ink2);
    font-size: 17px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ci-tool.on {
    border-color: #4b4b55;
    color: var(--ink);
    background: #1d1d22;
}

.chat-preview,
.emoji-pad {
    flex: 0 0 100%;
}

.bubble {
    position: relative;
}

.msg-menu {
    position: fixed;
    z-index: 60;
    background: #24242a;
    border: 1px solid var(--line2);
    border-radius: 10px;
    padding: 4px;
    display: flex;
    gap: 4px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .5);
}

.msg-menu button {
    border: 0;
    background: none;
    color: var(--ink);
    font-family: inherit;
    font-size: 13px;
    padding: 7px 14px;
    border-radius: 8px;
    cursor: pointer;
}

.msg-menu button:active {
    background: #303038;
}

.msg.copied .bubble {
    outline: 1px solid #4b4b55;
}

/* 骨架屏 */
.sk-row {
    display: flex;
    gap: 10px;
    padding: 12px 4px;
    align-items: center;
}

.sk {
    background: linear-gradient(90deg, #17171a 25%, #202024 37%, #17171a 63%);
    background-size: 400% 100%;
    animation: sk 1.3s ease infinite;
    border-radius: 8px;
    height: 14px;
}

.sk-av {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    flex: 0 0 auto;
}

.sk-lines {
    flex: 1;
}

@keyframes sk {
    0% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0 50%;
    }
}

.chat-tools {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
}

.chat-preview {
    display: flex;
    align-items: center;
    gap: 10px;
}

.chat-preview img {
    max-width: 90px;
    max-height: 90px;
    border-radius: 9px;
    border: 1px solid var(--line2);
}

.emoji-pad {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    max-height: 132px;
    overflow-y: auto;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 6px;
    background: #101013;
}

.emoji-i {
    border: 0;
    background: none;
    font-size: 19px;
    line-height: 1.3;
    padding: 3px 4px;
    border-radius: 7px;
    cursor: pointer;
}

.emoji-i:active {
    background: #26262b;
}

/* ---------- 全部订单流 ---------- */
.oflow-act {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.oflow {
    display: flex;
    flex-direction: column;
}

.oflow-row {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 12px 15px;
    border-bottom: 1px solid var(--line);
}

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

.oflow-av {
    flex: 0 0 auto;
}

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

.oflow-top {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.oflow-who {
    font-weight: 600;
    font-size: 13.5px;
}

.oflow-what {
    font-size: 12.5px;
    color: var(--ink2);
    margin-top: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.oflow-time {
    flex: 0 0 auto;
    font-size: 11px;
    color: var(--ink3);
    padding-top: 2px;
}

@media (max-width: 760px) {
    .adm-chat {
        grid-template-columns: 1fr;
    }

    .adm-threads {
        max-height: 220px;
    }
}

/* ---------- 消息：微信式会话列表 ---------- */
.wx-wrap {
    max-width: 720px;
}

.wx-list {
    margin-top: 12px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--r);
    overflow: hidden;
}

.wx-row {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 13px 14px;
    border-bottom: 1px solid var(--line);
    color: var(--ink);
    position: relative;
}

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

.wx-row:active {
    background: var(--card2);
}

.wx-av {
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    overflow: hidden;
    background: #26262b;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wx-av .av,
.wx-av .av-wrap,
.wx-av .av svg {
    width: 44px;
    height: 44px;
    border-radius: 10px;
}

.wx-av .vip-dot {
    right: -1px;
    bottom: -1px;
}

.wx-av-flow {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
}

.wx-av-flow svg {
    width: 30px;
    height: 30px;
}

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

.wx-top {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
}

.wx-top b {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wx-time {
    margin-left: auto;
    flex: 0 0 auto;
    font-size: 11px;
    color: var(--ink3);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.wx-mute {
    font-style: normal;
    color: #6b7280;
    font-size: 10px;
}

.wx-sub {
    font-size: 12.5px;
    color: var(--ink3);
    margin-top: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wx-sub.unread {
    color: var(--ink2);
}

.wx-badge {
    position: absolute;
    right: 14px;
    bottom: 10px;
    min-width: 17px;
    height: 17px;
    padding: 0 5px;
    border-radius: 20px;
    background: var(--bad);
    color: #fff;
    font-size: 10.5px;
    line-height: 17px;
    text-align: center;
    font-weight: 600;
}

.wx-tip {
    font-size: 11.5px;
    color: var(--ink3);
    margin-top: 4px;
}

/* ---------- 会话页：整屏铺满（微信那种，不用外圈卡片） ---------- */
.chat-wrap.im {
    max-width: 720px;
    padding-left: 0;
    padding-right: 0;
    padding-bottom: 0;
}

.chat-wrap.im .chat-shell {
    margin-top: 10px;
    border-left: 0;
    border-right: 0;
    border-radius: 0;
    height: calc(100vh - 56px - 120px);
    min-height: 360px;
}

.chat-wrap.im .chat-head {
    gap: 8px;
    padding: 8px 10px;
}

.chat-head-av {
    flex: 0 0 auto;
    display: inline-flex;
}

.chat-head-av .av,
.chat-head-av .av svg {
    width: 32px;
    height: 32px;
}

.chat-who {
    min-width: 0;
}

.chat-who .chat-name {
    font-size: 13.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-wrap.im .chat-body {
    gap: 10px;
    padding: 12px 10px;
}

/* 消息头像：外包一层，方便「连续同一个人」时只留第一条 */
.msg-av {
    flex: 0 0 auto;
    display: inline-flex;
    width: 34px;
    justify-content: center;
}

.msg-av .av,
.msg-av .av svg {
    width: 34px;
    height: 34px;
}

.msg-same .msg-av {
    visibility: hidden;
}

.msg-same .msg-who {
    display: none;
}

.msg-same .msg-time {
    display: none;
}

.msg .bubble-wrap {
    max-width: calc(100% - 46px);
}

.msg-out .msg-time {
    order: 2;
}

.msg-copy-hint {
    display: none;
}

/* 输入条：一行放下「表情 / 图片 / 输入框 / 发送」，预览和表情面板掉到下一行 */
.chat-input {
    flex-wrap: wrap;
    row-gap: 6px;
    align-items: flex-end;
}

.ci-bar {
    display: flex;
    gap: 4px;
    align-items: center;
    order: 1;
}

.ci-bar .ci-tool {
    width: 32px;
    height: 32px;
}

.ci-tool svg {
    width: 19px;
    height: 19px;
}

.chat-input textarea.input {
    order: 2;
    flex: 1;
    min-width: 0;
}

.chat-input #sendBtn {
    order: 3;
}

.chat-preview,
.emoji-pad {
    order: 4;
    flex: 0 0 100%;
}

@media (max-width: 760px) {
    .chat-wrap.im .chat-shell {
        height: calc(100vh - 50px - 118px - env(safe-area-inset-bottom));
        min-height: 320px;
    }
}

/* ---------- 我的订单：统计条 + 消息红点 ---------- */
.my-stat {
    display: flex;
    border: 1px solid var(--line);
    border-radius: var(--r);
    background: var(--card);
    overflow: hidden;
    margin-bottom: 12px;
}

.my-stat > div {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 12px 4px;
    border-right: 1px solid var(--line);
}

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

.my-stat b {
    font-size: 15px;
    white-space: nowrap;
}

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

.my-chat-dot {
    flex: 0 0 auto;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 20px;
    background: var(--bad);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    line-height: 20px;
    text-align: center;
}

/* ---------- 订单流：统计与翻页 ---------- */
.oflow-wrap {
    max-width: 720px;
}

.oflow-stat {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    font-size: 12px;
    color: var(--ink3);
    margin-bottom: 12px;
}

.oflow-stat b {
    color: var(--ink);
}

.oflow-page {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 14px;
}

/* ---------- 头像尺寸与徽章 ---------- */
.av-lg {
    width: 56px;
    height: 56px;
    font-size: 18px;
}

.av-xl {
    width: 76px;
    height: 76px;
    font-size: 26px;
    font-weight: 600;
}

.av-img {
    object-fit: cover;
    background: #1b1b1f;
    border: 1px solid var(--line2);
}

.av-station {
    background: radial-gradient(circle at 30% 25%, #3b2f0a, #14100a 70%);
    border: 1px solid #6b5518;
    color: #f2d06b;
    font-weight: 700;
}

.av-svc.av-img {
    border-radius: 50%;
}

.av-wrap {
    position: relative;
    display: inline-flex;
    flex: 0 0 auto;
    vertical-align: middle;
}

.vip-dot {
    position: absolute;
    right: -3px;
    bottom: -2px;
    font-style: normal;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .2px;
    line-height: 1;
    padding: 2px 4px;
    min-width: 15px;
    border-radius: 20px;
    color: #fff;
    text-align: center;
    box-shadow: 0 0 0 2px var(--bg), 0 0 8px rgba(255, 255, 255, .35);
    animation: vipFlow 3.2s linear infinite;
    background-size: 300% 300%;
}

.vip {
    display: inline-flex;
    align-items: center;
    font-style: normal;
    font-size: 10.5px;
    font-weight: 800;
    line-height: 1;
    padding: 3px 6px;
    border-radius: 20px;
    color: #fff;
    letter-spacing: .3px;
    white-space: nowrap;
    background-size: 300% 300%;
    animation: vipFlow 3.2s linear infinite;
    box-shadow: 0 0 10px rgba(255, 255, 255, .12);
    flex: 0 0 auto;
}

.vip-vip,
.vip-dot.vip-vip {
    background-image: linear-gradient(90deg, #38bdf8, #a78bfa, #f472b6, #38bdf8);
}

.vip-svip,
.vip-dot.vip-svip {
    background-image: linear-gradient(90deg, #f59e0b, #f43f5e, #8b5cf6, #f59e0b);
}

.vip-ssvip,
.vip-dot.vip-ssvip {
    background-image: linear-gradient(90deg, #fde047, #f97316, #ef4444, #a855f7, #22d3ee, #fde047);
    box-shadow: 0 0 12px rgba(253, 224, 71, .45);
}

@keyframes vipFlow {
    0% {
        background-position: 0% 50%;
    }

    100% {
        background-position: 300% 50%;
    }
}

/* ---------- 头像编辑 ---------- */
.av-edit {
    display: flex;
    gap: 14px;
    align-items: center;
    padding: 4px 0 14px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 14px;
}

.av-edit-pic {
    flex: 0 0 auto;
    line-height: 0;
}

.av-edit-act {
    flex: 1;
    min-width: 0;
}

.av-edit-t {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 2px;
}

/* ---------- 后台用户行 ---------- */
.seg.seg-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    width: 100%;
}

/* 后台底部导航 */
.adm-tabbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    display: flex;
    align-items: stretch;
    justify-content: space-around;
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    background: rgba(18, 18, 20, .97);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid var(--line);
}

.adm-tab {
    position: relative;
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 5px 0 3px;
    color: var(--ink3);
    font-size: 10.5px;
    border-radius: 10px;
    transition: color .15s, background .15s;
}

.adm-tab-ico {
    position: relative;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.adm-tab-ico svg {
    width: 21px;
    height: 21px;
}

.adm-tab-txt {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.adm-tab.on {
    color: var(--ink);
    background: #26262b;
}

.adm-tab.on .adm-tab-ico::after {
    content: "";
    position: absolute;
    bottom: -5px;
    left: 50%;
    width: 14px;
    height: 2px;
    margin-left: -7px;
    border-radius: 2px;
    background: var(--ink);
}

.adm-tab-dot {
    position: absolute;
    top: -4px;
    right: -8px;
    min-width: 15px;
    height: 15px;
    padding: 0 4px;
    border-radius: 20px;
    background: var(--bad);
    color: #fff;
    font-size: 10px;
    font-style: normal;
    line-height: 15px;
    text-align: center;
    font-weight: 600;
}

/* 底部导航占位：不用再靠页面底部 padding 顶住 */
.adm-has-tabbar {
    padding-bottom: calc(96px + env(safe-area-inset-bottom)) !important;
}

/* 后台新订单 / 新消息提示：从顶上滑下来，10 秒后自己收 */
.adm-toast {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 200;
    padding: calc(10px + env(safe-area-inset-top)) 10px 0;
    transform: translateY(-120%);
    opacity: 0;
    transition: transform .32s cubic-bezier(.22, 1, .36, 1), opacity .24s;
    pointer-events: none;
}

.adm-toast[hidden] {
    display: none;
}

.adm-toast.on {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.adm-toast-in {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 12px 13px;
    border-radius: 14px;
    background: linear-gradient(180deg, #2b2f3a, #1d2027);
    border: 1px solid rgba(255, 255, 255, .12);
    box-shadow: 0 10px 30px rgba(0, 0, 0, .45);
    color: var(--ink);
    overflow: hidden;
    cursor: pointer;
}

.adm-toast-ico {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(255, 255, 255, .09);
    font-size: 17px;
}

.adm-toast-txt {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    line-height: 1.35;
}

.adm-toast-txt b {
    font-size: 13.5px;
    font-weight: 600;
}

.adm-toast-txt span {
    font-size: 12px;
    color: var(--ink3);
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.adm-toast-x {
    flex: 0 0 auto;
    width: 26px;
    height: 26px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .08);
    color: var(--ink3);
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
}

.adm-toast-bar {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background: rgba(255, 255, 255, .08);
}

.adm-toast-bar i {
    display: block;
    height: 100%;
    width: 100%;
    background: var(--ink);
    transform-origin: left center;
}

@keyframes admToastBar {
    from { transform: scaleX(1); }
    to   { transform: scaleX(0); }
}

/* 桌面端后台没有底部站点导航栏，提示条别被后台自己的导航盖住 */
.pg-admin #toast {
    bottom: calc(96px + env(safe-area-inset-bottom));
}

.seg-wrap a {
    flex: 1 1 auto;
}

.seg-wrap button {
    display: block;
    width: 100%;
    white-space: nowrap;
    padding: 7px 10px;
    font-size: 12.5px;
}

.adm-user {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.adm-user-av {
    flex: 0 0 auto;
    padding-top: 2px;
    line-height: 0;
}

/* ---------- 后台人数概览 ---------- */
.adm-people {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin: 12px 0 14px;
}

.adm-ppl {
    display: block;
    padding: 10px 12px;
    border-radius: 12px;
    background: var(--card, #fff);
    border: 1px solid var(--line, rgba(0, 0, 0, .07));
    color: inherit;
    text-decoration: none;
    min-width: 0;
}

.adm-ppl b {
    display: block;
    font-size: 20px;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
}

.adm-ppl span {
    display: block;
    font-size: 12px;
    color: var(--ink2, #666);
    margin-top: 2px;
}

.adm-ppl em {
    display: block;
    font-style: normal;
    font-size: 11px;
    color: var(--ink3, #999);
    margin-top: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.adm-ppl-auto.on {
    border-color: rgba(34, 160, 100, .45);
}

.adm-ppl-auto.on b {
    color: #22a064;
}

/* ---------- 后台自动派单卡片 ---------- */
.card.adm-auto {
    margin-bottom: 12px;
}

.adm-auto-head {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    flex-wrap: wrap;
}

.adm-auto-head > div:first-child {
    flex: 1 1 220px;
    min-width: 0;
}

.adm-auto-form {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.adm-switch {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
}

.adm-switch input {
    width: 16px;
    height: 16px;
    margin: 0;
}

.adm-auto-log {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px dashed var(--line, rgba(0, 0, 0, .08));
    font-size: 12px;
    color: var(--ink3, #999);
}

.adm-auto-log > div {
    display: flex;
    gap: 8px;
    padding: 3px 0;
    min-width: 0;
}

.adm-auto-log b {
    color: var(--ink, #222);
    font-weight: 500;
    flex: 0 0 auto;
}

.adm-auto-log span {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.adm-auto-log i {
    flex: 0 0 auto;
    font-style: normal;
}

@media (max-width: 560px) {
    .adm-people {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.adm-thread {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.adm-thread-main {
    flex: 1;
    min-width: 0;
}

/* ---------- 首页动态跑马灯 ---------- */
.ticker {
    display: flex;
    align-items: center;
    gap: 0;
    margin: 14px 0 4px;
    border-radius: 999px;
    overflow: hidden;
    position: relative;
    background-size: 400% 400%;
    animation: tickerFlow 7s ease-in-out infinite;
    box-shadow: 0 6px 24px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .18);
}

@keyframes tickerFlow {
    0% {
        background-image: linear-gradient(100deg, #ff2f8e, #7c3aed, #06b6d4, #22c55e);
        background-position: 0% 50%;
    }

    25% {
        background-image: linear-gradient(100deg, #f59e0b, #ef4444, #ec4899, #6366f1);
        background-position: 60% 50%;
    }

    50% {
        background-image: linear-gradient(100deg, #14b8a6, #3b82f6, #a855f7, #f43f5e);
        background-position: 100% 50%;
    }

    75% {
        background-image: linear-gradient(100deg, #eab308, #22c55e, #0ea5e9, #d946ef);
        background-position: 40% 50%;
    }

    100% {
        background-image: linear-gradient(100deg, #ff2f8e, #7c3aed, #06b6d4, #22c55e);
        background-position: 0% 50%;
    }
}

.ticker-tag {
    flex: 0 0 auto;
    padding: 6px 12px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 2px;
    color: #fff;
    background: rgba(0, 0, 0, .35);
    border-right: 1px solid rgba(255, 255, 255, .25);
    text-shadow: 0 1px 2px rgba(0, 0, 0, .5);
}

.ticker-view {
    flex: 1;
    overflow: hidden;
    position: relative;
    height: 32px;
}

.ticker-track {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    display: flex;
    align-items: center;
    white-space: nowrap;
    animation: tickerRun 20s linear infinite;
    will-change: transform;
}

.ticker:hover .ticker-track {
    animation-play-state: paused;
}

@keyframes tickerRun {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

.ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 22px;
    font-size: 12.5px;
    color: #fff;
    cursor: pointer;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .45);
}

.ticker-item b {
    font-weight: 700;
}

.ticker-item span {
    opacity: .85;
}

.ticker-item::after {
    content: "";
    width: 4px;
    height: 4px;
    margin-left: 18px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .7);
}

/* ---------- 动态详情弹层 ---------- */
#feedMask .modal {
    max-width: 420px;
}

.feed-detail {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.feed-author {
    display: flex;
    align-items: center;
    gap: 10px;
}

.feed-author-name {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 700;
}

.feed-title {
    margin: 0;
    font-size: 16px;
}

.feed-body {
    font-size: 13.5px;
    color: var(--ink2);
    line-height: 1.85;
    white-space: pre-wrap;
    word-break: break-word;
}

/* ---------- 移动端 ---------- */
@media (max-width: 640px) {
    .wrap {
        padding: 0 14px 48px;
    }

    .h1 {
        font-size: 22px;
        margin-top: 20px;
    }

    .card {
        padding: 16px;
    }

    .nav a span.lbl {
        display: none;
    }

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

    .stat {
        padding: 11px 12px;
    }

    .stat-n {
        font-size: 17px;
    }

    .km-grid {
        gap: 8px;
    }

    .km {
        padding: 13px 6px;
    }

    .km-n {
        font-size: 18px;
    }

    .order-meta {
        gap: 10px 14px;
    }

    .row {
        flex-direction: column;
    }

    .modal {
        padding: 18px;
    }

    /* 移动端：顶栏精简 + 底部导航 */
    .top-in {
        height: 50px;
        padding: 0 14px;
    }

    .nav {
        display: none;
    }

    .wrap {
        padding-bottom: calc(78px + env(safe-area-inset-bottom));
    }

    .footer {
        padding-bottom: calc(78px + env(safe-area-inset-bottom));
    }

    .chat-shell {
        height: calc(100vh - 50px - 168px - env(safe-area-inset-bottom));
        min-height: 340px;
        margin-top: 10px;
    }

    #toast {
        bottom: calc(84px + env(safe-area-inset-bottom));
    }

    .tabbar {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 40;
        display: flex;
        align-items: stretch;
        justify-content: space-around;
        padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
        background: rgba(18, 18, 20, .96);
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
        border-top: 1px solid var(--line);
    }

    .tab {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 2px;
        padding: 4px 0;
        color: var(--ink3);
        font-size: 10.5px;
        transition: color .15s;
    }

    .tab-ico {
        position: relative;
        width: 24px;
        height: 24px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .tab-ico svg {
        width: 22px;
        height: 22px;
    }

    .tab.on {
        color: var(--ink);
    }

    .tab-dot {
        position: absolute;
        top: -4px;
        right: -8px;
        min-width: 16px;
        height: 16px;
        padding: 0 4px;
        border-radius: 20px;
        background: var(--bad);
        color: #fff;
        font-size: 10px;
        font-style: normal;
        line-height: 16px;
        text-align: center;
        font-weight: 600;
    }
}
