/*!
 * 第三方（渠道）报备端 - 移动端样式
 *
 * 设计基调：蓝色主色（与后台 --ui-primary #2b5cf6 同源，两端观感统一）
 *          + 浅灰底 + 白卡片 + 大圆角 + 克制的阴影。
 * 该应用不引入 layui / jQuery（移动端只需要轻量交互），全部样式自包含，
 * 与后台 admin.css 互不影响。
 */

:root {
    /* 主色：与后台一致；移动端再提亮一档，弱光下更清晰 */
    --rep-primary: #2b5cf6;
    --rep-primary-dark: #1e46cc;
    --rep-primary-light: #6b8dff;
    --rep-primary-soft: #eef3ff;
    --rep-primary-ring: rgba(43, 92, 246, .16);
    --rep-gradient: linear-gradient(135deg, #4d7bff 0%, #2b5cf6 55%, #1e46cc 100%);

    --rep-bg: #f4f6fb;
    --rep-card: #ffffff;
    --rep-text: #2f3542;
    --rep-title: #1b2330;
    --rep-muted: #98a2b3;
    --rep-line: #edf0f5;
    --rep-line-strong: #e2e7ef;

    --rep-success: #16a34a;
    --rep-success-soft: #e9f8ef;
    --rep-warning: #d97706;
    --rep-warning-soft: #fdf3e3;
    --rep-danger: #dc2626;
    --rep-danger-soft: #fdecec;
    --rep-info: #2563eb;

    --rep-radius: 14px;
    --rep-radius-sm: 10px;
    --rep-shadow: 0 1px 2px rgba(27, 35, 48, .04), 0 6px 16px rgba(27, 35, 48, .05);
    --rep-shadow-up: 0 -4px 16px rgba(27, 35, 48, .06);
    --rep-tabbar-h: 56px;
    /* 底部操作条的预留高度：提示行 20 + 按钮行 46 + 上下内边距 22 = 88，取 96 留余量。
       实际渲染高度由页面脚本量取后写回，这里只保证脚本执行前不遮挡内容。 */
    --rep-actionbar-h: 96px;
    --rep-safe-b: env(safe-area-inset-bottom, 0px);
    --rep-ease: cubic-bezier(.22, .61, .36, 1);
}

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

html {
    touch-action: manipulation;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--rep-bg);
    color: var(--rep-text);
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
    font-size: 15px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
input, textarea, select, button { font-family: inherit; font-size: inherit; }
button { cursor: pointer; }
svg { display: block; }

/* ==================================================================
 * 页面骨架
 * ================================================================ */
.rep-page {
    max-width: 560px;
    margin: 0 auto;
    padding: 0 14px calc(var(--rep-tabbar-h) + var(--rep-safe-b) + 18px);
}

.rep-page--plain { padding-bottom: 24px; }

/* 底部有固定操作条时，给内容让出高度，避免被遮住 */
.rep-page--with-actionbar {
    padding-bottom: calc(var(--rep-tabbar-h) + var(--rep-actionbar-h) + var(--rep-safe-b) + 16px);
}

.rep-head {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 50px;
    margin: 0 -14px 12px;
    padding: 0 48px;
    background: rgba(244, 246, 251, .92);
    backdrop-filter: saturate(180%) blur(10px);
    -webkit-backdrop-filter: saturate(180%) blur(10px);
    font-size: 17px;
    font-weight: 600;
    letter-spacing: .3px;
    color: var(--rep-title);
    text-align: center;
}

.rep-head__action {
    position: absolute;
    right: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #6b7686;
    transition: background .16s var(--rep-ease);
}

.rep-head__action:active { background: rgba(43, 92, 246, .1); color: var(--rep-primary); }

/* ==================================================================
 * 卡片与区块
 * ================================================================ */
.rep-card {
    background: var(--rep-card);
    border-radius: var(--rep-radius);
    box-shadow: var(--rep-shadow);
    padding: 14px;
    margin-bottom: 12px;
}

.rep-card--tight { padding: 12px; }
.rep-card--flat { box-shadow: none; border: 1px solid var(--rep-line); }

.rep-project {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 13px 6px 10px;
    background: var(--rep-primary-soft);
    border: 1px solid rgba(43, 92, 246, .12);
    border-radius: 999px;
    color: var(--rep-primary-dark);
    font-size: 13.5px;
    font-weight: 500;
}

.rep-section {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 16px 2px 10px;
    font-size: 15px;
    font-weight: 600;
    color: var(--rep-title);
}

.rep-section::before {
    content: "";
    width: 3px;
    height: 14px;
    border-radius: 2px;
    background: var(--rep-gradient);
}

.rep-section__extra {
    margin-left: auto;
    font-size: 12.5px;
    font-weight: 400;
    color: var(--rep-muted);
}

/* ==================================================================
 * 表单
 * ================================================================ */
.rep-field { margin-bottom: 14px; }
.rep-field:last-child { margin-bottom: 0; }

.rep-label {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 7px;
    font-size: 13.5px;
    color: var(--rep-muted);
}

.rep-label--required::after {
    content: "*";
    margin-left: -2px;
    color: var(--rep-danger);
    font-size: 13px;
}

.rep-input,
.rep-textarea,
.rep-select {
    display: block;
    width: 100%;
    min-height: 46px;
    padding: 11px 13px;
    border: 1px solid var(--rep-line-strong);
    border-radius: var(--rep-radius-sm);
    background: #fbfcfe;
    color: var(--rep-text);
    outline: none;
    transition: border-color .16s var(--rep-ease), background .16s var(--rep-ease), box-shadow .16s var(--rep-ease);
}

.rep-textarea { min-height: 92px; resize: vertical; line-height: 1.6; }

.rep-input:focus,
.rep-textarea:focus,
.rep-select:focus {
    border-color: var(--rep-primary);
    background: #fff;
    box-shadow: 0 0 0 3px var(--rep-primary-ring);
}

.rep-select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2398a2b3' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 34px;
}

.rep-input::placeholder,
.rep-textarea::placeholder { color: #b9c1cd; }

/* 校验失败：红边 + 红字（比只弹 toast 更容易定位是哪个字段） */
.rep-input.is-invalid,
.rep-textarea.is-invalid,
.rep-select.is-invalid,
.rep-phone__wrap.is-invalid,
.rep-phone.is-invalid .rep-phone__part {
    border-color: var(--rep-danger);
    background: var(--rep-danger-soft);
}

.rep-help {
    margin-top: 6px;
    font-size: 12.5px;
    color: var(--rep-muted);
}

.rep-help--error { color: var(--rep-danger); }

/* 智能识别自动填充标记 */
.rep-autofill {
    display: none;
    margin-left: auto;
    padding: 1px 7px;
    border-radius: 5px;
    background: var(--rep-success-soft);
    color: var(--rep-success);
    font-size: 11.5px;
    font-weight: 400;
}

.rep-autofill.is-on { display: inline-block; }

/* 性别单选：选中态整块高亮 */
.rep-radio-row { display: flex; align-items: center; gap: 10px; }

.rep-radio {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 46px;
    padding: 0 16px 0 12px;
    border: 1px solid var(--rep-line-strong);
    border-radius: var(--rep-radius-sm);
    background: #fbfcfe;
    color: var(--rep-text);
    transition: all .16s var(--rep-ease);
}

.rep-radio input { position: absolute; opacity: 0; width: 0; height: 0; }

.rep-radio__dot {
    position: relative;
    width: 19px;
    height: 19px;
    flex: none;
    border: 1.5px solid #cbd3df;
    border-radius: 50%;
    background: #fff;
    transition: all .16s var(--rep-ease);
}

.rep-radio:has(input:checked) {
    border-color: var(--rep-primary);
    background: var(--rep-primary-soft);
    color: var(--rep-primary-dark);
    font-weight: 500;
}

.rep-radio input:checked + .rep-radio__dot {
    border-color: var(--rep-primary);
    box-shadow: 0 0 0 3px var(--rep-primary-ring);
}

.rep-radio input:checked + .rep-radio__dot::after {
    content: "";
    position: absolute;
    inset: 4px;
    border-radius: 50%;
    background: var(--rep-primary);
}

/* 手机号：前3位 / **** / 后4位 分段输入 + 小眼睛切完整输入 */
.rep-phone { display: flex; align-items: center; gap: 8px; }

/* 分段态：三个格子，中间格以 **** 遮住 */
.rep-phone__seg {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.rep-phone__part {
    flex: 1 1 0;
    min-width: 0;
    min-height: 46px;
    padding: 0 10px;
    border: 1px solid var(--rep-line-strong);
    border-radius: var(--rep-radius-sm);
    background: #fbfcfe;
    color: var(--rep-text);
    font-family: inherit;
    font-size: inherit;
    text-align: center;
    letter-spacing: .6px;
    font-variant-numeric: tabular-nums;
    outline: none;
    transition: border-color .16s var(--rep-ease), background .16s var(--rep-ease), box-shadow .16s var(--rep-ease);
}

.rep-phone__part::placeholder {
    color: #b9c1cd;
    letter-spacing: 0;
}

.rep-phone__part:focus {
    border-color: var(--rep-primary);
    background: #fff;
    box-shadow: 0 0 0 3px var(--rep-primary-ring);
}

/* 中间 4 位窄一点，前后两段宽一点，与「前3 / 后4」的观感一致 */
.rep-phone__part--mid { flex: 0 0 76px; }

.rep-phone__wrap {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 46px;
    padding: 0 13px;
    border: 1px solid var(--rep-line-strong);
    border-radius: var(--rep-radius-sm);
    background: #fbfcfe;
    transition: border-color .16s var(--rep-ease), background .16s var(--rep-ease), box-shadow .16s var(--rep-ease);
}

/* display:flex 会盖掉 hidden 属性的默认 display:none，这里显式补两条 */
.rep-phone__seg[hidden],
.rep-phone__wrap[hidden] { display: none; }

.rep-phone__wrap.is-focus {
    border-color: var(--rep-primary);
    background: #fff;
    box-shadow: 0 0 0 3px var(--rep-primary-ring);
}

.rep-phone__input {
    flex: 1;
    min-width: 0;
    border: 0;
    background: transparent;
    outline: none;
    letter-spacing: .8px;
    font-variant-numeric: tabular-nums;
}

.rep-phone__sep { color: var(--rep-muted); letter-spacing: 2px; }

.rep-phone__eye {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex: none;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--rep-muted);
    transition: background .16s var(--rep-ease), color .16s var(--rep-ease);
}

.rep-phone__eye:active { background: var(--rep-primary-soft); color: var(--rep-primary); }

/* ==================================================================
 * 按钮
 * ================================================================ */
.rep-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 46px;
    padding: 0 20px;
    border: 0;
    border-radius: 999px;
    background: var(--rep-gradient);
    color: #fff;
    font-size: 16px;
    font-weight: 500;
    letter-spacing: .3px;
    /* 按钮文字永不折行：窄屏下折成两行会顶高整条操作栏（「清空重填」踩过） */
    white-space: nowrap;
    box-shadow: 0 6px 16px rgba(43, 92, 246, .26);
    transition: transform .12s var(--rep-ease), opacity .16s var(--rep-ease), box-shadow .16s var(--rep-ease);
}

.rep-btn:active { transform: scale(.985); box-shadow: 0 3px 10px rgba(43, 92, 246, .22); }
.rep-btn[disabled] { opacity: .55; box-shadow: none; }

.rep-btn--block { display: flex; width: 100%; }
.rep-btn--ghost {
    background: var(--rep-primary-soft);
    color: var(--rep-primary-dark);
    box-shadow: none;
}
.rep-btn--ghost:active { background: #e3ebff; }
.rep-btn--line {
    background: #fff;
    color: var(--rep-primary-dark);
    border: 1px solid rgba(43, 92, 246, .35);
    box-shadow: none;
}
.rep-btn--sm { min-height: 36px; padding: 0 14px; font-size: 13.5px; }

/* 操作条里的「次按钮」：宽度按文字自适应，主按钮吃掉剩余空间 */
.rep-btn--sub {
    flex: 0 0 auto;
    padding: 0 16px;
    font-size: 15px;
}

.rep-inline-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 36px;
    padding: 0 14px;
    border: 0;
    border-radius: 999px;
    background: var(--rep-gradient);
    color: #fff;
    font-size: 13.5px;
    box-shadow: 0 4px 12px rgba(43, 92, 246, .22);
}

/* 底部固定操作条：主按钮始终可达，少滚动一屏 */
.rep-actionbar {
    position: fixed;
    left: 50%;
    bottom: calc(var(--rep-tabbar-h) + var(--rep-safe-b));
    z-index: 25;
    width: 100%;
    max-width: 560px;
    transform: translateX(-50%);
    padding: 10px 14px 12px;
    background: linear-gradient(180deg, rgba(244, 246, 251, 0) 0%, var(--rep-bg) 42%);
}

.rep-actionbar__hint {
    margin-bottom: 8px;
    font-size: 12.5px;
    color: var(--rep-muted);
    text-align: center;
}

/* 操作条的按钮行：次按钮按内容宽、主按钮占满剩余；两个按钮等高 */
.rep-actionbar__row {
    display: flex;
    align-items: stretch;
    gap: 10px;
}

.rep-actionbar__row .rep-btn:not(.rep-btn--sub) {
    flex: 1 1 auto;
    min-width: 0;
}

/* ==================================================================
 * 粘贴识别区
 * ================================================================ */
.rep-paste__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 8px;
}

.rep-paste__link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 32px;
    border: 0;
    background: transparent;
    padding: 0;
    color: var(--rep-muted);
    font-size: 13px;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.rep-paste__link:active { color: var(--rep-primary); }

/* ==================================================================
 * 列表（我的报备）
 * ================================================================ */
.rep-search {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 44px;
    padding: 0 14px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: #eaedf3;
    color: var(--rep-muted);
    transition: all .16s var(--rep-ease);
}

.rep-search:focus-within {
    border-color: var(--rep-primary);
    background: #fff;
    box-shadow: 0 0 0 3px var(--rep-primary-ring);
}

.rep-search input {
    flex: 1;
    min-width: 0;
    border: 0;
    background: transparent;
    outline: none;
    color: var(--rep-text);
}

.rep-search input::-webkit-search-cancel-button { display: none; }

.rep-filters {
    display: flex;
    gap: 8px;
    margin: 12px -14px 0;
    padding: 0 14px 12px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.rep-filters::-webkit-scrollbar { display: none; }

.rep-chip {
    flex: none;
    min-height: 34px;
    padding: 0 16px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: #eaedf3;
    color: #667085;
    font-size: 13.5px;
    white-space: nowrap;
    transition: all .16s var(--rep-ease);
}

.rep-chip.is-active {
    background: var(--rep-gradient);
    color: #fff;
    box-shadow: 0 4px 12px rgba(43, 92, 246, .26);
}

.rep-item {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 14px 14px 16px;
    margin-bottom: 10px;
    background: var(--rep-card);
    border-radius: var(--rep-radius);
    box-shadow: var(--rep-shadow);
    overflow: hidden;
}

/* 左侧状态色条：一眼看出进展，不用读文字 */
.rep-item::before {
    content: "";
    position: absolute;
    left: 0;
    top: 12px;
    bottom: 12px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: var(--rep-muted);
}

.rep-item[data-tone="warning"]::before { background: var(--rep-warning); }
.rep-item[data-tone="primary"]::before { background: var(--rep-primary); }
.rep-item[data-tone="success"]::before { background: var(--rep-success); }
.rep-item[data-tone="danger"]::before  { background: var(--rep-danger); }

.rep-item__main { flex: 1; min-width: 0; }

.rep-item__top {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.rep-item__name {
    font-size: 16px;
    font-weight: 600;
    color: var(--rep-title);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rep-item__meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    color: #4b5563;
    font-variant-numeric: tabular-nums;
}

.rep-item__time {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
    font-size: 12.5px;
    color: var(--rep-muted);
    font-variant-numeric: tabular-nums;
}

.rep-item__time span { color: #6b7280; }

.rep-item__qr {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: var(--rep-primary-soft);
    color: var(--rep-primary);
    transition: background .16s var(--rep-ease);
}

.rep-item__qr:active { background: #dfe8ff; }

.rep-item__qr[disabled] {
    background: #f2f4f7;
    color: #c3cad4;
}

.rep-badge {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 6px;
    font-size: 12px;
    line-height: 18px;
}

.rep-badge--warning { background: var(--rep-warning-soft); color: var(--rep-warning); }
.rep-badge--primary { background: #eaf1fe; color: var(--rep-info); }
.rep-badge--success { background: var(--rep-success-soft); color: var(--rep-success); }
.rep-badge--danger  { background: var(--rep-danger-soft); color: var(--rep-danger); }
.rep-badge--default { background: #f1f3f6; color: var(--rep-muted); }

.rep-empty {
    padding: 46px 16px;
    text-align: center;
    color: var(--rep-muted);
    font-size: 14px;
}

.rep-empty__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 62px;
    height: 62px;
    margin-bottom: 12px;
    border-radius: 50%;
    background: var(--rep-primary-soft);
    color: var(--rep-primary-light);
}

.rep-empty__title { color: #667085; font-size: 14.5px; }
.rep-empty__sub { margin-top: 5px; font-size: 12.5px; color: #a9b2bf; }

/* 骨架屏：首屏加载不再是干巴巴的「加载中…」 */
.rep-skeleton { padding: 2px 0; }

.rep-skeleton__item {
    padding: 14px 14px 14px 16px;
    margin-bottom: 10px;
    background: var(--rep-card);
    border-radius: var(--rep-radius);
    box-shadow: var(--rep-shadow);
}

.rep-skeleton__line {
    height: 12px;
    border-radius: 6px;
    background: linear-gradient(90deg, #eef1f6 25%, #e4e8ef 37%, #eef1f6 63%);
    background-size: 400% 100%;
    animation: rep-shimmer 1.4s ease infinite;
}

.rep-skeleton__line + .rep-skeleton__line { margin-top: 9px; }

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

.rep-end {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 0 22px;
    color: #c0c7d2;
    font-size: 12.5px;
}

.rep-end::before,
.rep-end::after {
    content: "";
    width: 34px;
    height: 1px;
    background: var(--rep-line-strong);
}

/* ==================================================================
 * 底部 Tab
 * ================================================================ */
.rep-tabbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 30;
    display: flex;
    height: calc(var(--rep-tabbar-h) + var(--rep-safe-b));
    padding-bottom: var(--rep-safe-b);
    background: rgba(255, 255, 255, .96);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    border-top: 1px solid var(--rep-line);
    box-shadow: var(--rep-shadow-up);
}

.rep-tabbar__item {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    color: #9aa4b2;
    font-size: 11.5px;
    transition: color .16s var(--rep-ease);
}

.rep-tabbar__item.is-active { color: var(--rep-primary); }

/* 选中态顶部小横条 */
.rep-tabbar__item.is-active::before {
    content: "";
    position: absolute;
    top: 0;
    width: 22px;
    height: 3px;
    border-radius: 0 0 3px 3px;
    background: var(--rep-gradient);
}

.rep-tabbar__label { display: inline-flex; align-items: center; gap: 3px; }

/* 未读/待处理角标：小圆形，文字右侧（规范要求） */
.rep-tabbar__badge {
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    background: var(--rep-danger);
    color: #fff;
    font-size: 10.5px;
    line-height: 16px;
    text-align: center;
    box-shadow: 0 0 0 2px #fff;
}

/* ==================================================================
 * 弹层（二维码 / 成功提示）
 * ================================================================ */
.rep-mask {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(17, 22, 30, .48);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    animation: rep-fade .18s var(--rep-ease);
}

.rep-modal {
    position: relative;
    width: 100%;
    max-width: 320px;
    max-height: 86vh;
    overflow-y: auto;
    padding: 20px 18px;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 18px 46px rgba(17, 22, 30, .22);
    animation: rep-pop .22s var(--rep-ease);
}

.rep-modal__title {
    margin: 2px 0 14px;
    font-size: 16.5px;
    font-weight: 600;
    text-align: center;
    color: var(--rep-title);
}

.rep-modal__close {
    position: absolute;
    top: 10px;
    right: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #b6bec9;
    transition: background .16s var(--rep-ease);
}

.rep-modal__close:active { background: #f2f4f7; }

.rep-qr {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px 0 14px;
}

.rep-qr__frame {
    padding: 10px;
    border: 1px dashed var(--rep-line-strong);
    border-radius: 14px;
    background: #fbfcfe;
}

.rep-qr img,
.rep-qr canvas { display: block; border-radius: 4px; }

.rep-qr__info { border-top: 1px solid var(--rep-line); padding-top: 12px; }

.rep-qr__row {
    display: flex;
    gap: 10px;
    padding: 5px 0;
    font-size: 13.5px;
}

.rep-qr__row dt { flex: none; width: 68px; color: var(--rep-muted); margin: 0; }
.rep-qr__row dd { flex: 1; margin: 0; color: var(--rep-text); word-break: break-all; }

.rep-qr__tip {
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: var(--rep-radius-sm);
    background: var(--rep-primary-soft);
    color: var(--rep-primary-dark);
    font-size: 12.5px;
    line-height: 1.55;
}

.rep-toast {
    position: fixed;
    left: 50%;
    top: 42%;
    z-index: 99;
    max-width: 78vw;
    transform: translate(-50%, -50%);
    padding: 11px 18px;
    border-radius: 10px;
    background: rgba(27, 35, 48, .9);
    color: #fff;
    font-size: 14px;
    text-align: center;
    box-shadow: 0 10px 28px rgba(17, 22, 30, .24);
    animation: rep-fade .16s var(--rep-ease);
}

@keyframes rep-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes rep-pop { from { opacity: 0; transform: scale(.95) translateY(6px); } to { opacity: 1; transform: scale(1) translateY(0); } }

/* ==================================================================
 * 我的（Tab3）
 * ================================================================ */
.rep-profile {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px 18px;
    border-radius: var(--rep-radius);
    background: var(--rep-gradient);
    color: #fff;
    box-shadow: 0 10px 24px rgba(43, 92, 246, .28);
    margin-bottom: 12px;
}

.rep-profile__avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    flex: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, .22);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .28);
    font-size: 21px;
    font-weight: 600;
}

.rep-profile__name { font-size: 17px; font-weight: 600; }
.rep-profile__sub { margin-top: 3px; font-size: 12.5px; opacity: .88; }

/* 统计：一条卡片三等分 + 竖分隔线 */
.rep-stats {
    display: flex;
    padding: 4px 0;
    border-radius: var(--rep-radius);
    background: #fff;
    box-shadow: var(--rep-shadow);
    margin-bottom: 12px;
}

.rep-stats__item {
    position: relative;
    flex: 1;
    padding: 12px 6px;
    text-align: center;
}

.rep-stats__item + .rep-stats__item::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 1px;
    height: 26px;
    transform: translateY(-50%);
    background: var(--rep-line);
}

.rep-stats__value {
    font-size: 19px;
    font-weight: 600;
    color: var(--rep-title);
    font-variant-numeric: tabular-nums;
}

.rep-stats__value--primary { color: var(--rep-primary); }
.rep-stats__value--success { color: var(--rep-success); }

.rep-stats__label { margin-top: 2px; font-size: 12px; color: var(--rep-muted); }

.rep-cells {
    border-radius: var(--rep-radius);
    background: #fff;
    box-shadow: var(--rep-shadow);
    overflow: hidden;
    margin-bottom: 12px;
}

.rep-cell {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 52px;
    padding: 0 14px;
    border: 0;
    border-bottom: 1px solid var(--rep-line);
    background: transparent;
    font-size: 14.5px;
    text-align: left;
    color: var(--rep-text);
}

.rep-cell:last-child { border-bottom: 0; }
.rep-cell__icon { display: inline-flex; color: #aab3c0; flex: none; }
.rep-cell__label { flex: none; width: 84px; color: var(--rep-muted); font-size: 13.5px; }
.rep-cell__value { flex: 1; text-align: right; color: var(--rep-text); word-break: break-all; }
.rep-cell--link:active { background: #f7f9fc; }
.rep-cell--danger .rep-cell__value { color: var(--rep-danger); }
.rep-cell__arrow { display: inline-flex; color: #c8d0da; flex: none; }

/* ==================================================================
 * 登录 / 注册页（简洁扁平：无渐变、无剪影、无卡片浮层）
 * ================================================================ */
.rep-login {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 44px 20px 32px;
    background: #fff;
}

/* 品牌区：实底方块 + 标题 + 项目名，纵向居中排列 */
.rep-login__brand {
    width: 100%;
    max-width: 380px;
    margin-bottom: 26px;
    text-align: center;
}

.rep-login__logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin-bottom: 14px;
    border-radius: 10px;
    background: var(--rep-primary);
    color: #fff;
}

/* 已上传站点 LOGO：按原始比例展示，不再套色块背景 */
.rep-login__logo--img {
    width: auto;
    height: auto;
    max-width: 220px;
    background: transparent;
}

.rep-login__logo--img img {
    display: block;
    max-width: 220px;
    max-height: 80px;
    object-fit: contain;
}

.rep-login__title {
    font-size: 19px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--rep-title);
}

.rep-login__sub {
    margin-top: 5px;
    font-size: 13px;
    color: var(--rep-muted);
}

/* 表单：直接落在页面上，不套卡片（去掉背景、圆角与阴影） */
.rep-login__card {
    width: 100%;
    max-width: 380px;
    margin: 0;
    padding: 0;
    background: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

/* 登录/注册页内的输入框：白底细边框，聚焦只变色不加光圈 */
.rep-login .rep-input,
.rep-login .rep-textarea,
.rep-login .rep-select {
    background: #fff;
    border-radius: 8px;
}

.rep-login .rep-input:focus,
.rep-login .rep-textarea:focus,
.rep-login .rep-select:focus {
    background: #fff;
    box-shadow: none;
}

.rep-login .rep-label {
    margin-bottom: 6px;
    font-size: 13px;
    color: var(--rep-text);
}

/* 登录/注册页内的按钮：实底、8px 圆角、无阴影 */
.rep-login .rep-btn {
    border-radius: 8px;
    box-shadow: none;
    letter-spacing: 0;
}

.rep-login .rep-btn:not(.rep-btn--ghost):not(.rep-btn--line) {
    background: var(--rep-primary);
}

.rep-login .rep-btn:active {
    box-shadow: none;
    opacity: .9;
    transform: none;
}

.rep-login__submit {
    margin-top: 22px;
}

/* 公告：一行浅灰底文字，不加图标强调 */
.rep-login__notice {
    display: flex;
    align-items: center;
    gap: 7px;
    width: 100%;
    max-width: 380px;
    margin-bottom: 18px;
    padding: 9px 11px;
    border-radius: 6px;
    background: #f6f7f9;
    font-size: 12.5px;
    line-height: 1.5;
    color: var(--rep-muted);
}

.rep-login__notice svg { flex: none; color: var(--rep-muted); }

/* 演示账号：一行文字开关 + 展开后的朴素按钮 */
.rep-login__demo {
    width: 100%;
    max-width: 380px;
    margin-top: 18px;
    text-align: center;
}

.rep-login__demo-toggle {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 0;
    border: 0;
    background: none;
    font-family: inherit;
    font-size: 12.5px;
    color: var(--rep-primary);
    cursor: pointer;
}

.rep-login__demo-toggle:hover { opacity: .8; }

.rep-login__demo-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-top: 12px;
}

/* display:grid 会盖掉 hidden 属性的默认 display:none，这里显式补一条 */
.rep-login__demo-list[hidden] { display: none; }

/* 页脚处的文字链接（立即注册）：扁平化后不用下划线 */
.rep-login .rep-paste__link {
    color: var(--rep-primary);
    text-decoration: none;
}

.rep-login__demo-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 8px 6px;
    border: 1px solid var(--rep-line);
    border-radius: 8px;
    background: #fff;
    font-family: inherit;
    cursor: pointer;
}

.rep-login__demo-item:hover { border-color: var(--rep-primary); }
.rep-login__demo-company { font-size: 12.5px; font-weight: 600; color: var(--rep-title); }
.rep-login__demo-acc { font-size: 11.5px; color: var(--rep-muted); }

.rep-login__foot {
    margin-top: 20px;
    text-align: center;
    font-size: 12px;
    color: #9aa3b2;
}

/* 密码显隐 */
.rep-pwd { position: relative; }

.rep-pwd .rep-input { padding-right: 46px; }

.rep-pwd__eye {
    position: absolute;
    right: 6px;
    top: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    transform: translateY(-50%);
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--rep-muted);
}

.rep-pwd__eye:active { background: var(--rep-primary-soft); color: var(--rep-primary); }

/* ==================================================================
 * 凭据页
 * ================================================================ */
.rep-credential { text-align: center; }

.rep-credential__status {
    display: inline-block;
    margin-bottom: 10px;
    padding: 3px 12px;
    border-radius: 999px;
    font-size: 13px;
}

.rep-credential__seal {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 62px;
    height: 62px;
    margin-bottom: 12px;
    border-radius: 50%;
    background: var(--rep-primary-soft);
    color: var(--rep-primary);
}

.rep-credential__name {
    font-size: 20px;
    font-weight: 600;
    color: var(--rep-title);
    letter-spacing: .5px;
}

.rep-credential__rows { text-align: left; margin-top: 14px; }

/* ==================================================================
 * 桌面预览：居中成手机宽度，避免在电脑上被拉满
 * ================================================================ */
@media (min-width: 720px) {
    body { background: #e9ecf3; }

    .rep-page {
        background: var(--rep-bg);
        min-height: 100vh;
        box-shadow: 0 0 0 1px rgba(27, 35, 48, .04);
    }

    /* 登录页保持纯白、不加外框，与移动端一致 */
    .rep-login {
        background: #fff;
        min-height: 100vh;
        box-shadow: none;
    }

    .rep-tabbar {
        left: 50%;
        right: auto;
        width: 560px;
        max-width: 560px;
        transform: translateX(-50%);
    }
}

/* 弱动效偏好：关闭动画 */
@media (prefers-reduced-motion: reduce) {
    * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* ==================================================================
 * 到店核销凭据页 / 客户自助核销页
 *
 * 凭据页同时服务三种角色：渠道出示、工作人员核销、客户自看；
 * 工作人员核销按钮与「已核销」状态就地在同一张卡片里切换。
 * ================================================================ */
.rep-redeem {
    margin-top: 16px;
}

.rep-redeem__help {
    margin-top: 8px;
    text-align: center;
}

.rep-done {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
    padding: 12px 14px;
    text-align: left;
    color: var(--rep-success);
    background: var(--rep-success-soft);
    border-radius: 10px;
}

.rep-done__title {
    font-size: 14.5px;
    font-weight: 600;
}

.rep-selfentry {
    margin-top: 12px;
    text-align: center;
}

.rep-selfentry__title {
    font-size: 14px;
    font-weight: 600;
    color: var(--rep-title);
    margin-bottom: 6px;
}

.rep-selfentry .rep-btn {
    margin-top: 12px;
}

/* ---------------- 自助核销 ---------------- */
.rep-selfcheck {
    text-align: center;
    padding: 22px 16px 18px;
}

.rep-selfcheck__mark,
.rep-selfdone__mark {
    display: inline-flex;
    width: 56px;
    height: 56px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(135deg, #4d7bff, #2b5cf6);
    box-shadow: 0 6px 16px rgba(43, 92, 246, .28);
}

.rep-selfcheck__title {
    margin-top: 12px;
    font-size: 17px;
    font-weight: 600;
    color: var(--rep-title);
}

.rep-selfcheck__sub {
    margin: 6px auto 18px;
    max-width: 300px;
}

.rep-selfcheck form {
    text-align: left;
}

.rep-label__opt {
    margin-left: 4px;
    font-style: normal;
    font-size: 12px;
    color: var(--rep-muted);
}

.rep-selfcheck__foot {
    margin-top: 14px;
}

.rep-selfcheck--fail .rep-selfcheck__mark--warn {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    box-shadow: 0 6px 16px rgba(245, 158, 11, .26);
}

.rep-selfcheck--fail .rep-btn {
    margin-top: 16px;
}

.rep-selfdone {
    text-align: center;
    padding: 30px 16px;
}

.rep-selfdone__mark {
    background: linear-gradient(135deg, #34d399, #10b981);
    box-shadow: 0 6px 16px rgba(16, 185, 129, .26);
}

.rep-selfdone__title {
    margin-top: 12px;
    font-size: 17px;
    font-weight: 600;
    color: var(--rep-title);
}

/* 到店核销：工作人员身份与入口（微信扫码场景） */
.rep-redeem__who {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-bottom: 10px;
    padding: 7px 10px;
    border-radius: 9px;
    background: var(--rep-success-soft);
    color: var(--rep-success);
    font-size: 13px;
}

.rep-redeem__who svg { flex: none; }
