/* ============================================
   员工 / 代理 工作台 - 移动端优先样式 (HTML5)
   主色：青绿 #11998e，与 H5 用户端(蓝)区分
   ============================================ */

:root {
    --primary: #11998e;
    --primary-dark: #0d7d74;
    --primary-light: #e6f7f5;
    --accent: #38ef7d;
    --text: #333;
    --text-sub: #999;
    --bg: #f5f6fa;
    --border: #f0f0f0;
    --radius: 10px;

    /* 渐变与立体阴影（视觉增强层使用） */
    --grad-primary: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    --grad-primary-soft: linear-gradient(135deg, #13a99c 0%, #2fd47a 100%);
    --sd-1: 0 1px 2px rgba(16, 24, 40, .04), 0 2px 6px rgba(16, 24, 40, .05);
    --sd-2: 0 1px 2px rgba(16, 24, 40, .04), 0 6px 16px rgba(16, 24, 40, .07);
    --sd-3: 0 4px 10px rgba(16, 24, 40, .07), 0 16px 36px rgba(16, 24, 40, .12);
    --hl: inset 0 1px 0 rgba(255, 255, 255, .85);
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { font-size: 14px; -webkit-text-size-adjust: 100%; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    padding-bottom: 60px;
    -webkit-overflow-scrolling: touch;
}
a { color: var(--primary); text-decoration: none; }
input, select, textarea, button { font-family: inherit; font-size: inherit; outline: none; }
img { max-width: 100%; display: block; }
ul, ol { list-style: none; }

/* ========== 顶部导航 ========== */
.header {
    position: sticky; top: 0; z-index: 100;
    height: 48px; background: var(--primary); color: #fff;
    display: flex; align-items: center; padding: 0 12px;
}
.header .back { font-size: 20px; width: 28px; cursor: pointer; }
.header .title { flex: 1; font-size: 17px; font-weight: 500; text-align: center; }
.header .action { font-size: 13px; min-width: 28px; text-align: right; cursor: pointer; }

/* ========== 身份头部 ========== */
.staff-header {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    padding: 20px 16px 24px; color: #fff;
}
.staff-header .row { display: flex; align-items: center; gap: 12px; }
.staff-header .avatar {
    width: 52px; height: 52px; border-radius: 50%;
    background: rgba(255,255,255,.28);
    display: flex; align-items: center; justify-content: center;
    font-size: 24px; flex-shrink: 0;
}
.staff-header .name { font-size: 17px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.staff-header .phone { font-size: 12px; opacity: .85; margin-top: 4px; }
.role-badge {
    display: inline-block; padding: 1px 8px; border-radius: 10px;
    background: rgba(255,255,255,.3); font-size: 11px; font-weight: 400;
}

/* ========== 统计卡片（2×2 网格） ========== */
.stat-grid {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px;
    padding: 12px; margin-top: -14px;
}
.stat-card {
    background: #fff; border-radius: var(--radius); padding: 14px 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,.05); text-align: center;
}
.stat-card .num { font-size: 22px; font-weight: 700; color: var(--primary); line-height: 1.2; }
.stat-card .label { font-size: 12px; color: var(--text-sub); margin-top: 4px; }

/* 一行四格小统计 */
.stat-row { display: flex; background: #fff; padding: 14px 0; margin-top: 10px; }
.stat-row .stat-item { flex: 1; text-align: center; }
.stat-row .stat-item .num { font-size: 17px; font-weight: 600; color: var(--primary); }
.stat-row .stat-item .label { font-size: 11px; color: var(--text-sub); margin-top: 3px; }

/* ========== 卡片 ========== */
.card { background: #fff; margin: 10px 12px; border-radius: var(--radius); padding: 14px; }
.card-head {
    display: flex; align-items: center; justify-content: space-between;
    font-size: 15px; font-weight: 600; margin-bottom: 10px;
}
.card-head .more { font-size: 12px; color: var(--text-sub); font-weight: 400; }

/* ========== 搜索 + 筛选 ========== */
.search-bar { padding: 10px 12px; background: #fff; display: flex; gap: 8px; }
.search-bar input {
    flex: 1; height: 36px; border: 1px solid #e8e8e8; border-radius: 18px;
    padding: 0 14px; background: var(--bg); font-size: 14px;
}
.search-bar input:focus { border-color: var(--primary); }
.search-bar .search-btn {
    height: 36px; padding: 0 16px; border: none; border-radius: 18px;
    background: var(--primary); color: #fff; font-size: 14px; flex-shrink: 0;
}
.filter-bar {
    display: flex; gap: 8px; padding: 8px 12px; background: #fff;
    border-bottom: 1px solid var(--border); overflow-x: auto;
    -ms-overflow-style: none; scrollbar-width: none;
}
.filter-bar::-webkit-scrollbar { display: none; }
.filter-bar .chip {
    padding: 5px 14px; border-radius: 15px; font-size: 13px;
    background: var(--bg); color: #666; white-space: nowrap;
    border: 1px solid transparent; cursor: pointer; flex-shrink: 0;
}
.filter-bar .chip.active { background: var(--primary-light); color: var(--primary); border-color: var(--primary); }

/* ========== 列表项（卡片式，适合手机） ========== */
.list { padding: 10px 12px 0; }
.item {
    background: #fff; border-radius: var(--radius); padding: 12px 14px;
    margin-bottom: 10px; box-shadow: 0 1px 4px rgba(0,0,0,.04);
}
.item-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.item-title { font-size: 15px; font-weight: 600; flex: 1; min-width: 0;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-meta { font-size: 12px; color: var(--text-sub); margin-top: 6px; line-height: 1.7; }
.item-meta .k { color: #bbb; }
.item-row { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.item-ops {
    display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px;
    padding-top: 10px; border-top: 1px dashed var(--border);
}

/* ========== 标签 ========== */
.tag { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 11px; line-height: 18px; flex-shrink: 0; }
.tag-teal   { background: var(--primary-light); color: var(--primary); }
.tag-blue   { background: #e6f7ff; color: #2d8cf0; }
.tag-green  { background: #e8fce8; color: #19be6b; }
.tag-orange { background: #fff7e6; color: #f90; }
.tag-red    { background: #fde8e8; color: #ed4014; }
.tag-gray   { background: #f0f0f0; color: #999; }

/* ========== 按钮 ========== */
.btn {
    display: block; width: 100%; height: 44px; border: none; border-radius: 22px;
    font-size: 16px; text-align: center; line-height: 44px; cursor: pointer;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:active { background: var(--primary-dark); }
.btn-success { background: #19be6b; color: #fff; }
.btn-danger  { background: #ed4014; color: #fff; }
.btn-default { background: var(--bg); color: #666; border: 1px solid #ddd; }
.btn-block { margin: 14px 12px; width: calc(100% - 24px); }
.btn-sm {
    display: inline-block; width: auto; height: 30px; line-height: 30px;
    padding: 0 14px; font-size: 13px; border-radius: 15px;
}
.btn-outline { background: #fff; border: 1px solid var(--primary); color: var(--primary); }

/* ========== 表单 ========== */
.form-group { background: #fff; padding: 0 14px; }
.form-item { display: flex; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--border); }
.form-item:last-child { border-bottom: none; }
.form-item .label { width: 88px; color: #666; font-size: 14px; flex-shrink: 0; }
.form-item input, .form-item select, .form-item textarea {
    flex: 1; border: none; font-size: 14px; background: transparent; min-width: 0;
}
.form-item textarea { min-height: 56px; resize: vertical; padding-top: 2px; }
.form-item input::placeholder, .form-item textarea::placeholder { color: #ccc; }
.form-item input:disabled { color: #bbb; }
.form-tip { padding: 8px 14px; font-size: 12px; color: var(--text-sub); line-height: 1.6; }

/* ========== 开关控件 ========== */
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.switch input { display: none; }
.switch .track {
    position: relative; display: inline-block; width: 46px; height: 24px;
    background: #d5d9dd; border-radius: 12px; transition: background .2s; flex-shrink: 0;
}
.switch .track::after {
    content: ''; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px;
    background: #fff; border-radius: 50%; transition: left .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.switch input:checked + .track { background: var(--primary); }
.switch input:checked + .track::after { left: 24px; }
.switch .switch-text { font-size: 13px; color: #666; }
/* 表单行内的开关与说明文案 */
.form-item.form-item-block { align-items: flex-start; flex-wrap: wrap; }
.form-item .item-note { width: 100%; margin-top: 6px; font-size: 11px; color: var(--text-sub); line-height: 1.6; }

/* ========== 详情信息行 ========== */
.info-list { background: #fff; padding: 0 14px; }
.info-row { display: flex; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.info-row:last-child { border-bottom: none; }
.info-row .k { width: 95px; color: var(--text-sub); flex-shrink: 0; }
.info-row .v { flex: 1; word-break: break-all; }
.section-title {
    padding: 12px 14px 6px; font-size: 13px; color: var(--text-sub); font-weight: 500;
}

/* ========== 菜单列表 ========== */
.menu-list { background: #fff; margin-top: 10px; }
.menu-item {
    display: flex; align-items: center; padding: 14px;
    border-bottom: 1px solid var(--border); cursor: pointer;
}
.menu-item:last-child { border-bottom: none; }
.menu-item .icon { width: 26px; font-size: 18px; margin-right: 10px; text-align: center; }
.menu-item .text { flex: 1; font-size: 15px; }
.menu-item .val { font-size: 13px; color: var(--text-sub); margin-right: 6px; }
.menu-item .arrow { color: #ccc; font-size: 14px; }

/* ========== 底部 Tab 栏 ========== */
.tabbar {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
    height: 55px; background: #fff; border-top: 1px solid #e8e8e8;
    display: flex; align-items: center;
}
.tabbar .tab-item {
    flex: 1; text-align: center; color: var(--text-sub); cursor: pointer;
    display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.tabbar .tab-item.active { color: var(--primary); }
.tabbar .tab-item .tab-icon { font-size: 21px; line-height: 1; }
.tabbar .tab-item .tab-label { font-size: 11px; }
/* 6 个 Tab 时适当缩小，避免小屏拥挤 */
@media (max-width: 400px) {
    .tabbar .tab-item .tab-icon { font-size: 18px; }
    .tabbar .tab-item .tab-label { font-size: 10px; }
}

/* ========== 页面容器 ========== */
.page { display: none; }
.page.active { display: block; }

/* ========== 空态 / 加载 ========== */
.empty { text-align: center; padding: 50px 20px; color: #ccc; }
.empty .icon { font-size: 44px; margin-bottom: 8px; }
.empty .text { font-size: 14px; }
.loading { text-align: center; padding: 22px; color: var(--text-sub); font-size: 13px; }
.error-box { text-align: center; padding: 30px 20px; color: #ed4014; font-size: 13px; line-height: 1.7; }

/* ========== 弹层（底部抽屉，移动端友好） ========== */
.mask {
    position: fixed; inset: 0; background: rgba(0,0,0,.5);
    z-index: 200; display: none;
}
.mask.show { display: block; }
.sheet {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 201;
    background: #fff; border-radius: 16px 16px 0 0;
    max-height: 88vh; display: flex; flex-direction: column;
    transform: translateY(100%); transition: transform .25s ease;
}
.sheet.show { transform: translateY(0); }
.sheet-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px; border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.sheet-head .t { font-size: 16px; font-weight: 600; }
.sheet-head .x { font-size: 22px; color: #bbb; width: 30px; text-align: right; cursor: pointer; }
.sheet-body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.sheet-foot {
    display: flex; gap: 10px; padding: 12px 14px; border-top: 1px solid var(--border);
    flex-shrink: 0; background: #fff;
}
.sheet-foot .btn { flex: 1; }

/* ========== Toast ========== */
.toast {
    position: fixed; top: 50%; left: 50%; transform: translate(-50%,-50%);
    background: rgba(0,0,0,.78); color: #fff; padding: 11px 20px;
    border-radius: 8px; font-size: 14px; z-index: 300;
    display: none; max-width: 80%; text-align: center; line-height: 1.5;
}
.toast.show { display: block; }

/* ========== 浮动新增按钮 ========== */
.fab {
    position: fixed; right: 16px; bottom: 70px; z-index: 50;
    width: 48px; height: 48px; border-radius: 50%;
    background: var(--primary); color: #fff; border: none; font-size: 26px;
    box-shadow: 0 4px 14px rgba(17,153,142,.4);
    display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.fab:active { background: var(--primary-dark); }

/* ========== 分页 ========== */
.load-more { text-align: center; padding: 14px; color: var(--text-sub); font-size: 13px; cursor: pointer; }

/* ========== 登录页 ========== */
.login-wrap {
    height: 100vh; background: linear-gradient(160deg, var(--primary), var(--accent));
    display: flex; flex-direction: column; justify-content: center;
    padding: 0 24px; padding-bottom: 0; overflow: hidden;
}
.login-card { background: #fff; border-radius: 16px; padding: 28px 22px; box-shadow: 0 12px 40px rgba(0,0,0,.18); }
.login-card h1 { font-size: 20px; text-align: center; color: var(--text); }
.login-card .sub { font-size: 12px; color: var(--text-sub); text-align: center; margin: 6px 0 22px; }
.login-card .fi { margin-bottom: 16px; }
.login-card .fi label { display: block; font-size: 13px; color: #666; margin-bottom: 6px; }
.login-card .fi input {
    width: 100%; height: 46px; border: 1px solid #e5e5e5; border-radius: 10px;
    padding: 0 14px; font-size: 15px; background: #fafafa;
}
.login-card .fi input:focus { border-color: var(--primary); background: #fff; }
.login-card .msg { min-height: 20px; text-align: center; color: #ed4014; font-size: 13px; margin-top: 10px; }
.login-tips {
    margin-top: 18px; padding-top: 14px; border-top: 1px dashed #eee;
    font-size: 11px; color: #bbb; line-height: 1.9;
}

/* ========== 安全区适配（刘海屏） ========== */
@supports (padding: env(safe-area-inset-bottom)) {
    .tabbar { height: calc(55px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); }
    body { padding-bottom: calc(60px + env(safe-area-inset-bottom)); }
    .sheet-foot { padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
    .fab { bottom: calc(70px + env(safe-area-inset-bottom)); }
}

/* ========== 平板/桌面：居中限宽，模拟手机 ========== */
@media (min-width: 768px) {
    body { max-width: 480px; margin: 0 auto; box-shadow: 0 0 24px rgba(0,0,0,.08); min-height: 100vh; }
    .tabbar { max-width: 480px; left: 50%; transform: translateX(-50%); }
    .sheet { max-width: 480px; left: 50%; transform: translateX(-50%) translateY(100%); }
    .sheet.show { transform: translateX(-50%) translateY(0); }
    .fab { right: calc(50% - 240px + 16px); }
    .login-wrap { max-width: 480px; margin: 0 auto; }
}

/* ============================================================
   视觉增强层：渐变、光晕、多层阴影与微交互
   （只调视觉，不改布局结构）
   ============================================================ */

body {
    background:
        radial-gradient(760px 380px at 100% -6%, rgba(56, 239, 125, .10) 0%, transparent 60%),
        radial-gradient(620px 320px at -10% 102%, rgba(17, 153, 142, .09) 0%, transparent 58%),
        var(--bg);
    background-attachment: fixed;
    -webkit-font-smoothing: antialiased;
}

/* ---------- 顶部导航 ---------- */
.header {
    background: var(--grad-primary-soft);
    box-shadow: 0 2px 12px rgba(17, 153, 142, .28);
}
.header .title { font-weight: 600; letter-spacing: .3px; text-shadow: 0 1px 2px rgba(0, 0, 0, .12); }
.header .back { border-radius: 8px; transition: background .2s; }
.header .back:active { background: rgba(255, 255, 255, .18); }

/* ---------- 身份头部 ---------- */
.staff-header {
    position: relative; overflow: hidden;
    background: linear-gradient(135deg, #0f8d83 0%, #14b8a6 45%, #3ce97e 100%);
    padding: 22px 16px 30px;
    box-shadow: 0 6px 20px rgba(17, 153, 142, .26);
}
/* 两块柔光晕，避免大色块平面化 */
.staff-header::before,
.staff-header::after {
    content: ''; position: absolute; border-radius: 50%; pointer-events: none;
}
.staff-header::before {
    width: 190px; height: 190px; top: -95px; right: -55px;
    background: radial-gradient(circle, rgba(255, 255, 255, .26) 0%, transparent 70%);
}
.staff-header::after {
    width: 130px; height: 130px; bottom: -70px; left: -35px;
    background: radial-gradient(circle, rgba(255, 255, 255, .16) 0%, transparent 70%);
}
.staff-header .row { position: relative; z-index: 1; }
.staff-header .avatar {
    background: rgba(255, 255, 255, .26);
    border: 1px solid rgba(255, 255, 255, .38);
    box-shadow: 0 4px 14px rgba(0, 0, 0, .14), inset 0 1px 0 rgba(255, 255, 255, .5);
    -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.staff-header .name { text-shadow: 0 1px 3px rgba(0, 0, 0, .16); }
.role-badge {
    background: rgba(255, 255, 255, .26);
    border: 1px solid rgba(255, 255, 255, .34);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3);
}

/* ---------- 统计卡片 ---------- */
.stat-grid { margin-top: -20px; position: relative; z-index: 2; }
.stat-card {
    position: relative; overflow: hidden;
    border: 1px solid rgba(16, 24, 40, .04);
    box-shadow: var(--sd-2), var(--hl);
    transition: transform .22s cubic-bezier(.4, 0, .2, 1), box-shadow .22s;
}
.stat-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: var(--grad-primary); opacity: .85;
}
.stat-card:active { transform: translateY(-2px) scale(.995); box-shadow: var(--sd-3), var(--hl); }
.stat-card .num {
    background: var(--grad-primary);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
    font-variant-numeric: tabular-nums; letter-spacing: -.3px;
}

.stat-row {
    border-radius: var(--radius); margin: 10px 12px 0;
    border: 1px solid rgba(16, 24, 40, .04);
    box-shadow: var(--sd-1), var(--hl);
}
.stat-row .stat-item { position: relative; }
/* 格间细线，比实线边框更精致 */
.stat-row .stat-item + .stat-item::before {
    content: ''; position: absolute; left: 0; top: 18%; bottom: 18%; width: 1px;
    background: linear-gradient(180deg, transparent, #e9edf2 50%, transparent);
}
.stat-row .stat-item .num { font-variant-numeric: tabular-nums; }

/* ---------- 卡片 ---------- */
.card {
    border: 1px solid rgba(16, 24, 40, .04);
    box-shadow: var(--sd-1), var(--hl);
}
.card-head { position: relative; padding-left: 11px; }
.card-head::before {
    content: ''; position: absolute; left: 0; top: 3px; bottom: 3px; width: 3px;
    border-radius: 2px; background: var(--grad-primary);
}

/* ---------- 搜索 + 筛选 ---------- */
.search-bar { box-shadow: inset 0 -1px 0 var(--border); }
.search-bar input {
    background: #f7f9fb; border-color: #e6eaef;
    box-shadow: inset 0 1px 2px rgba(16, 24, 40, .04);
    transition: all .2s;
}
.search-bar input:focus {
    background: #fff; border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(17, 153, 142, .12);
}
.search-bar .search-btn {
    background: var(--grad-primary);
    box-shadow: 0 3px 10px rgba(17, 153, 142, .32), inset 0 1px 0 rgba(255, 255, 255, .25);
    transition: transform .16s, box-shadow .2s;
}
.search-bar .search-btn:active { transform: translateY(1px); box-shadow: 0 1px 4px rgba(17, 153, 142, .3); }

.filter-bar { box-shadow: 0 1px 3px rgba(16, 24, 40, .04); }
.filter-bar .chip {
    background: #f4f6f9; border-color: #eceff3;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7);
    transition: all .2s;
}
.filter-bar .chip.active {
    background: var(--grad-primary); color: #fff; border-color: transparent;
    box-shadow: 0 3px 10px rgba(17, 153, 142, .34), inset 0 1px 0 rgba(255, 255, 255, .25);
}

/* ---------- 列表卡片 ---------- */
.item {
    position: relative; overflow: hidden;
    border: 1px solid rgba(16, 24, 40, .04);
    box-shadow: var(--sd-1), var(--hl);
    transition: transform .2s cubic-bezier(.4, 0, .2, 1), box-shadow .2s;
}
/* 左侧竖向渐变色条 */
.item::before {
    content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
    background: var(--grad-primary); opacity: 0; transition: opacity .2s;
}
.item:active { transform: scale(.995); box-shadow: var(--sd-2), var(--hl); }
.item:active::before { opacity: 1; }
.item-title { letter-spacing: .2px; }
.item-ops { border-top-color: #eef1f5; }

/* ---------- 标签 ---------- */
.tag {
    border-radius: 5px; font-weight: 500; padding: 2px 9px;
    box-shadow: inset 0 0 0 1px rgba(16, 24, 40, .04);
}
.tag-teal   { background: linear-gradient(135deg, #e3f8f5, #d3f4ef); color: #0d8177; }
.tag-blue   { background: linear-gradient(135deg, #e8f4ff, #dbecff); color: #1f7ae0; }
.tag-green  { background: linear-gradient(135deg, #e7fbee, #d8f7e4); color: #0f9d58; }
.tag-orange { background: linear-gradient(135deg, #fff5e5, #ffedd2); color: #e08600; }
.tag-red    { background: linear-gradient(135deg, #ffecec, #ffdfdf); color: #e03e21; }
.tag-gray   { background: linear-gradient(135deg, #f4f5f7, #eaecef); color: #8a94a0; }

/* ---------- 按钮 ---------- */
.btn { transition: transform .16s ease, box-shadow .2s ease, filter .2s ease; font-weight: 500; }
.btn:active { transform: translateY(1px); }
.btn-primary {
    background: var(--grad-primary);
    box-shadow: 0 4px 14px rgba(17, 153, 142, .32), inset 0 1px 0 rgba(255, 255, 255, .25);
}
.btn-primary:active { background: var(--grad-primary); filter: brightness(.94); }
.btn-success {
    background: linear-gradient(135deg, #34d399, #059669);
    box-shadow: 0 4px 14px rgba(16, 185, 129, .3), inset 0 1px 0 rgba(255, 255, 255, .25);
}
.btn-danger {
    background: linear-gradient(135deg, #fb7185, #e11d48);
    box-shadow: 0 4px 14px rgba(225, 29, 72, .28), inset 0 1px 0 rgba(255, 255, 255, .25);
}
.btn-default {
    background: #fff; border-color: #e4e8ee; color: #5f6b7a;
    box-shadow: 0 1px 3px rgba(16, 24, 40, .06);
}
.btn-outline {
    background: #fff; border: 1px solid rgba(17, 153, 142, .45); color: var(--primary);
    box-shadow: 0 1px 3px rgba(16, 24, 40, .05);
}
.btn-outline:active { background: var(--primary-light); }

/* ---------- 表单 ---------- */
.form-group { box-shadow: var(--sd-1); }
.form-item { transition: background .18s; }
.form-item:focus-within { background: #f9fefd; }
.form-item .label { font-weight: 500; color: #55606d; }
.form-item input:focus, .form-item select:focus, .form-item textarea:focus { color: var(--text); }

/* ---------- 开关 ---------- */
.switch .track {
    background: linear-gradient(180deg, #dbdfe4, #cbd1d8);
    box-shadow: inset 0 1px 3px rgba(16, 24, 40, .18);
}
.switch .track::after { box-shadow: 0 1px 3px rgba(16, 24, 40, .3), 0 0 0 .5px rgba(16, 24, 40, .04); }
.switch input:checked + .track {
    background: var(--grad-primary);
    box-shadow: inset 0 1px 3px rgba(13, 125, 116, .3);
}

/* ---------- 详情信息 ---------- */
.info-list { box-shadow: var(--sd-1); }
.info-row { border-bottom-style: dashed; border-bottom-color: #eef1f5; }
.info-row .k { font-weight: 400; }
.section-title { position: relative; padding-left: 25px; font-weight: 600; color: #6b7684; }
.section-title::before {
    content: ''; position: absolute; left: 14px; top: 50%; transform: translateY(-40%);
    width: 3px; height: 12px; border-radius: 2px; background: var(--grad-primary);
}

/* ---------- 菜单列表 ---------- */
.menu-list {
    border-radius: var(--radius); margin: 10px 12px 0; overflow: hidden;
    border: 1px solid rgba(16, 24, 40, .04);
    box-shadow: var(--sd-1), var(--hl);
}
.menu-item { transition: background .18s; }
.menu-item:active { background: #f7fbfa; }
.menu-item .icon {
    width: 30px; height: 30px; margin-right: 11px; border-radius: 9px;
    display: flex; align-items: center; justify-content: center; font-size: 16px;
    background: linear-gradient(135deg, #eefaf8, #e2f6f2);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9);
}
.menu-item .arrow { color: #d3d8de; }

/* ---------- 底部 Tab ---------- */
.tabbar {
    background: rgba(255, 255, 255, .92);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    backdrop-filter: saturate(180%) blur(14px);
    border-top: 1px solid rgba(16, 24, 40, .06);
    box-shadow: 0 -2px 16px rgba(16, 24, 40, .07);
}
.tabbar .tab-item { position: relative; transition: color .2s; }
.tabbar .tab-item .tab-icon { transition: transform .22s cubic-bezier(.34, 1.5, .64, 1); }
.tabbar .tab-item.active .tab-icon { transform: translateY(-2px) scale(1.1); }
.tabbar .tab-item.active .tab-label { font-weight: 600; }
/* 顶部高亮指示条 */
.tabbar .tab-item.active::before {
    content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
    width: 22px; height: 3px; border-radius: 0 0 3px 3px;
    background: var(--grad-primary);
    box-shadow: 0 2px 8px rgba(17, 153, 142, .6);
}

/* ---------- 空态 / 加载 ---------- */
.empty .icon { opacity: .55; filter: grayscale(.2); }
.error-box {
    margin: 12px; padding: 22px 16px; border-radius: var(--radius);
    background: linear-gradient(135deg, #fff6f5, #ffeceb);
    border: 1px solid #ffd9d5;
}

/* ---------- 底部抽屉 ---------- */
.sheet {
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -10px 40px rgba(16, 24, 40, .22);
}
/* 顶部拖拽条 */
.sheet::before {
    content: ''; position: absolute; top: 7px; left: 50%; transform: translateX(-50%);
    width: 36px; height: 4px; border-radius: 2px; background: #dfe3e8;
}
.sheet-head { padding-top: 18px; background: linear-gradient(180deg, #fbfdfd, #fff); }
.sheet-head .t { letter-spacing: .3px; }
.sheet-head .x { border-radius: 8px; transition: color .2s; }
.sheet-head .x:active { color: #ed4014; }
.sheet-foot { box-shadow: 0 -2px 12px rgba(16, 24, 40, .06); }
.mask { -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }

/* ---------- Toast ---------- */
.toast {
    background: rgba(28, 32, 38, .88);
    -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
    box-shadow: 0 8px 28px rgba(0, 0, 0, .3);
    border: 1px solid rgba(255, 255, 255, .09);
}

/* ---------- 浮动按钮 ---------- */
.fab {
    background: var(--grad-primary);
    box-shadow: 0 6px 20px rgba(17, 153, 142, .45), inset 0 1px 0 rgba(255, 255, 255, .3);
    transition: transform .2s cubic-bezier(.34, 1.5, .64, 1), box-shadow .2s;
}
.fab:active { transform: scale(.92) rotate(90deg); box-shadow: 0 3px 12px rgba(17, 153, 142, .4); }

/* ---------- 分页 ---------- */
.load-more span {
    display: inline-block; padding: 5px 14px; border-radius: 14px;
    background: #fff; border: 1px solid #e8ecf1; color: var(--primary);
    box-shadow: 0 1px 3px rgba(16, 24, 40, .05);
}

/* ---------- 登录页 ---------- */
.login-wrap {
    position: relative; overflow: hidden;
    background: linear-gradient(160deg, #0c8279 0%, #14b8a6 48%, #3ce97e 100%);
    height: 100vh;
}
.login-wrap::before,
.login-wrap::after {
    content: ''; position: absolute; border-radius: 50%; pointer-events: none;
}
.login-wrap::before {
    width: 320px; height: 320px; top: -120px; right: -110px;
    background: radial-gradient(circle, rgba(255, 255, 255, .2) 0%, transparent 70%);
}
.login-wrap::after {
    width: 260px; height: 260px; bottom: -100px; left: -90px;
    background: radial-gradient(circle, rgba(255, 255, 255, .14) 0%, transparent 70%);
}
.login-card {
    position: relative; z-index: 1; border-radius: 18px;
    background: rgba(255, 255, 255, .97);
    box-shadow: 0 18px 50px rgba(0, 0, 0, .22), inset 0 1px 0 rgba(255, 255, 255, .9);
}
.login-card h1 {
    background: var(--grad-primary);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; font-weight: 700;
}
.login-card .fi input {
    background: #f7f9fb; border-color: #e6eaef;
    box-shadow: inset 0 1px 2px rgba(16, 24, 40, .04); transition: all .2s;
}
.login-card .fi input:focus {
    background: #fff; border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(17, 153, 142, .14);
}

/* 全局：表单控件主色 */
input[type=checkbox], input[type=radio] { accent-color: var(--primary); }

/* 细腻滚动条 */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-thumb { background: rgba(16, 24, 40, .16); border-radius: 3px; }
::-webkit-scrollbar-track { background: transparent; }

/* ========== 实名认证表单美化 ========== */
.rn-status {
    padding: 14px 16px; border-radius: 10px; font-size: 13px;
    line-height: 1.7; margin-bottom: 14px; display: flex; align-items: flex-start; gap: 8px;
}
.rn-status .rn-status-icon { font-size: 18px; flex-shrink: 0; line-height: 1.4; }
.rn-status.s-pending { background: #fdf6ec; color: #b88230; }
.rn-status.s-passed { background: #f0f9eb; color: #3d8b37; }
.rn-status.s-rejected { background: #fef0f0; color: #c45656; }
.rn-status.s-none { background: #f4f4f5; color: #909399; }

.rn-type-bar { display: flex; gap: 10px; margin-bottom: 14px; }
.rn-type-btn {
    flex: 1; padding: 11px 8px; text-align: center; border: 1.5px solid #dcdfe6;
    border-radius: 10px; background: #fff; color: #606266; font-size: 14px;
    cursor: pointer; transition: all .2s; font-weight: 500;
}
.rn-type-btn.active {
    border-color: var(--primary); background: var(--primary-light);
    color: var(--primary); font-weight: 600;
    box-shadow: 0 0 0 3px rgba(17, 153, 142, .1);
}

.rn-card {
    background: #fff; border-radius: 12px; padding: 4px 16px;
    box-shadow: 0 1px 4px rgba(0,0,0,.04); margin-bottom: 14px;
}
.rn-field {
    padding: 13px 0; border-bottom: 1px solid #f0f0f0;
}
.rn-field:last-child { border-bottom: none; }
.rn-field .lbl {
    font-size: 12px; color: #909399; margin-bottom: 6px; font-weight: 500;
    letter-spacing: .3px;
}
.rn-field input {
    width: 100%; border: none; outline: none; font-size: 15px;
    color: #303133; background: transparent; padding: 2px 0;
}
.rn-field input::placeholder { color: #c0c4cc; }

.rn-upload-section { margin-bottom: 14px; }
.rn-upload-section .rn-section-title {
    font-size: 13px; color: #606266; font-weight: 500; margin-bottom: 10px;
}
.rn-upload-grid {
    display: flex; gap: 12px; flex-wrap: wrap;
}
.rn-up-item { width: calc(50% - 6px); }
.rn-up-item.full { width: 100%; }
.rn-up-label {
    font-size: 12px; color: #909399; margin-bottom: 6px; font-weight: 500;
}
.rn-up-box {
    position: relative; width: 100%; height: 100px;
    border: 1.5px dashed #d0d3d8; border-radius: 10px;
    background: #fafbfc; display: flex; align-items: center;
    justify-content: center; overflow: hidden; cursor: pointer;
    transition: border-color .2s, background .2s;
}
.rn-up-box:active { border-color: var(--primary); background: var(--primary-light); }
.rn-up-box .ph { color: #c0c4cc; font-size: 13px; text-align: center; line-height: 1.5; }
.rn-up-box .ph .ph-icon { font-size: 24px; display: block; margin-bottom: 2px; }
.rn-up-box img { width: 100%; height: 100%; object-fit: cover; }

.rn-info-card {
    background: #f8f9fa; border-radius: 10px; padding: 14px 16px; margin-bottom: 14px;
}
.rn-info-row {
    display: flex; padding: 8px 0; font-size: 13px;
}
.rn-info-row + .rn-info-row { border-top: 1px solid #eef0f3; }
.rn-info-row .rn-info-k { width: 100px; color: #909399; flex-shrink: 0; }
.rn-info-row .rn-info-v { flex: 1; color: #303133; word-break: break-all; }
.rn-info-row .rn-info-v img {
    max-width: 120px; max-height: 80px; border-radius: 6px; object-fit: cover;
}

.rn-tip {
    padding: 10px 14px; font-size: 12px; color: #e6a23c;
    line-height: 1.7; background: #fdf6ec; border-radius: 8px; margin-bottom: 10px;
}
.rn-tip::before { content: '💡 '; }
