/* ==========================================================================
   会计师协会 · 会员服务平台  样式表（自研，无第三方 UI 框架依赖）
   布局：顶部主导航（无侧边栏）+ 内容区 + 页脚
   ========================================================================== */

:root {
    --c-primary: #1c5fd0;
    --c-primary-dark: #164ba8;
    --c-primary-soft: #eaf1fd;
    --c-primary-line: #c8dbf7;
    --c-ink: #16233d;
    --c-success: #14874b;
    --c-success-soft: #e6f5ed;
    --c-warning: #b7791f;
    --c-warning-soft: #fdf3e2;
    --c-danger: #c0392b;
    --c-danger-soft: #fdecea;

    --c-bg: #f4f6fa;
    --c-surface: #ffffff;
    --c-surface-2: #f9fafc;
    --c-border: #e2e6ee;
    --c-border-strong: #cbd2df;

    --c-text: #1b2333;
    --c-text-2: #5a6478;
    --c-text-3: #8b93a5;

    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 16px;
    --shadow-sm: 0 1px 2px rgba(20, 32, 60, .06);
    --shadow: 0 4px 16px rgba(20, 32, 60, .08);
    --shadow-lg: 0 18px 48px rgba(20, 32, 60, .18);

    --strip-h: 38px;
    --header-h: 74px;
    --container: 1200px;
    --font: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.6;
    color: var(--c-text);
    background: var(--c-bg);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5 { margin: 0; font-weight: 600; color: var(--c-text); }
/* FocusOnNavigate 会把焦点交给页面标题，浏览器默认焦点框会显示成一个难看的黑框 */
h1:focus, h2:focus, h3:focus { outline: none; }
p { margin: 0; }
a { color: var(--c-primary); text-decoration: none; }
a:hover { text-decoration: underline; }
ul, ol { margin: 0; }

/* ==========================================================================
   1. 站点骨架
   ========================================================================== */
.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 20px;
}

.site { min-height: 100vh; display: flex; flex-direction: column; }
.site-main { flex: 1; padding-bottom: 16px; }

/* ---------- 顶部信息条 ---------- */
.topbar-strip {
    background: var(--c-ink);
    color: #a9b6cd;
    font-size: 12px;
}
.strip-inner { display: flex; align-items: center; gap: 12px; height: var(--strip-h); }
.strip-brand { color: #8b9bb8; letter-spacing: .3px; }
.strip-spacer { flex: 1; }
.strip-note { color: #8b9bb8; }
.strip-user { color: #fff; }

.topbar-user { display: flex; align-items: center; gap: 8px; }
.topbar-strip .btn {
    background: transparent;
    border-color: rgba(255, 255, 255, .26);
    color: #dbe4f2;
}
.topbar-strip .btn:hover:not(:disabled) { border-color: #fff; color: #fff; }
.topbar-strip .btn-primary {
    background: var(--c-primary);
    border-color: var(--c-primary);
    color: #fff;
}
.topbar-strip .btn-primary:hover:not(:disabled) { background: #2a6fe0; border-color: #2a6fe0; }
.topbar-strip .badge {
    background: rgba(255, 255, 255, .12);
    color: #dbe4f2;
    border-color: rgba(255, 255, 255, .2);
}

/* ---------- 站点头部 ---------- */
.site-header {
    background: var(--c-surface);
    border-bottom: 1px solid var(--c-border);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 50;
}
.header-inner {
    display: flex;
    align-items: center;
    gap: 20px;
    height: var(--header-h);
    position: relative;
}

.brand { display: flex; align-items: center; gap: 11px; flex: 0 0 auto; }
.brand:hover { text-decoration: none; }
.brand-logo {
    width: 40px; height: 40px; flex: 0 0 40px;
    border-radius: 11px;
    background: linear-gradient(135deg, var(--c-primary) 0%, #3f86e6 100%);
    color: #fff;
    display: grid; place-items: center;
    font-weight: 700; font-size: 19px;
}
.brand-text strong { display: block; font-size: 17px; letter-spacing: .5px; line-height: 1.3; }
.brand-text small { font-size: 10px; color: var(--c-text-3); letter-spacing: .7px; }

/* ---------- 主导航 ---------- */
.site-nav { display: flex; align-items: center; gap: 2px; margin-left: auto; }

.nav-link {
    display: flex; align-items: center; gap: 5px;
    padding: 9px 15px;
    border-radius: var(--radius-sm);
    color: var(--c-text-2);
    font-size: 14.5px;
    position: relative;
    transition: background .15s, color .15s;
}
.nav-link:hover { background: var(--c-primary-soft); color: var(--c-primary); text-decoration: none; }
.nav-link.active { color: var(--c-primary); font-weight: 600; }
.nav-link.active::after {
    content: ""; position: absolute; left: 15px; right: 15px; bottom: 1px;
    height: 2px; border-radius: 2px; background: currentColor;
}

.nav-toggle {
    display: none;
    margin-left: auto;
    width: 40px; height: 40px;
    border: 1px solid var(--c-border-strong);
    background: var(--c-surface);
    border-radius: var(--radius-sm);
    font-size: 17px;
    color: var(--c-text-2);
    cursor: pointer;
    align-items: center; justify-content: center;
}

/* ---------- 页脚 ---------- */
.site-footer { background: var(--c-ink); color: #a9b6cd; margin-top: 56px; }
.footer-inner {
    display: grid;
    grid-template-columns: 1.7fr 1fr 1fr 1.6fr;
    gap: 30px;
    padding: 42px 20px 32px;
}
.footer-brand .brand-text strong { color: #fff; }
.footer-brand .brand-text small { color: #7d8da8; }
.footer-logo { display: flex; align-items: center; gap: 11px; margin-bottom: 14px; }
.footer-brand p { font-size: 13px; line-height: 1.9; color: #93a2bb; }
.footer-col h4 { font-size: 14px; color: #fff; margin-bottom: 12px; }
.footer-col a { display: block; font-size: 13px; color: #a9b6cd; padding: 4px 0; }
.footer-col a:hover { color: #fff; text-decoration: none; }
.footer-col p { font-size: 13px; line-height: 1.9; color: #93a2bb; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .1); }
.footer-bottom .container {
    display: flex; align-items: center; justify-content: space-between;
    gap: 8px; flex-wrap: wrap;
    padding-top: 16px; padding-bottom: 16px;
    font-size: 12px; color: #7d8da8;
}

/* ==========================================================================
   2. 首页 · Banner / 区块 / 服务卡 / 流程
   ========================================================================== */
.hero {
    color: #fff;
    padding: 56px 0 62px;
    background:
        radial-gradient(1100px 380px at 88% -20%, rgba(255, 255, 255, .18), transparent 62%),
        radial-gradient(700px 320px at 4% 110%, rgba(255, 255, 255, .1), transparent 60%),
        linear-gradient(135deg, #10305f 0%, var(--c-primary) 54%, #3f86e6 100%);
}
.hero-inner {
    display: grid;
    grid-template-columns: 1.35fr 1fr;
    gap: 44px;
    align-items: center;
}
.hero-badge {
    display: inline-block;
    padding: 4px 13px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .16);
    border: 1px solid rgba(255, 255, 255, .22);
    font-size: 12px;
    letter-spacing: .4px;
}
.hero h1 { color: #fff; font-size: 40px; letter-spacing: 1.5px; margin: 16px 0 12px; }
.hero p { color: rgba(255, 255, 255, .87); font-size: 15px; line-height: 1.95; }
.hero-actions { display: flex; gap: 12px; margin-top: 28px; flex-wrap: wrap; }

.hero-panel {
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: var(--radius-lg);
    padding: 24px;
}
.hero-panel h3 { color: #fff; font-size: 17px; }
.hero-panel > p { font-size: 13px; margin-top: 6px; color: rgba(255, 255, 255, .82); }
.hero-search { display: flex; gap: 8px; margin-top: 16px; }
.hero-search .input { height: 40px; border: none; }
.hero-search .btn { height: 40px; padding: 0 20px; }
.hero-link { display: inline-block; margin-top: 14px; color: #fff; font-size: 13px; }
.hero-link:hover { color: #fff; }

.btn-light { background: #fff; border-color: #fff; color: var(--c-primary); }
.btn-light:hover:not(:disabled) { background: #eef4ff; border-color: #eef4ff; color: var(--c-primary-dark); }
.btn-outline-light { background: transparent; border-color: rgba(255, 255, 255, .62); color: #fff; }
.btn-outline-light:hover:not(:disabled) { background: rgba(255, 255, 255, .14); border-color: #fff; color: #fff; }
.btn-lg { padding: 11px 22px; font-size: 15px; }

.section { margin-top: 46px; }
.section-head { text-align: center; margin-bottom: 22px; }
.section-head h2 { font-size: 24px; letter-spacing: .5px; }
.section-head h2::after {
    content: ""; display: block; width: 40px; height: 3px; border-radius: 2px;
    background: var(--c-primary); margin: 10px auto 0;
}
.section-head p { color: var(--c-text-2); font-size: 13px; margin-top: 10px; }

.service-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.service-card {
    display: block;
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    padding: 24px 22px;
    color: var(--c-text);
    position: relative;
    overflow: hidden;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.service-card::before {
    content: ""; position: absolute; inset: 0 0 auto 0; height: 3px;
    background: linear-gradient(90deg, var(--c-primary), #3f86e6);
    transform: scaleX(0); transform-origin: left; transition: transform .22s ease;
}
.service-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
    border-color: var(--c-primary-line);
    text-decoration: none;
}
.service-card:hover::before { transform: scaleX(1); }
.service-icon {
    display: grid; place-items: center;
    width: 46px; height: 46px; border-radius: 12px;
    background: var(--c-primary-soft);
    font-size: 22px; margin-bottom: 14px;
}
.service-card h3 { font-size: 16px; margin-bottom: 8px; }
.service-card p { font-size: 13px; color: var(--c-text-2); line-height: 1.8; min-height: 70px; }
.service-go { display: inline-block; margin-top: 12px; font-size: 13px; font-weight: 500; color: var(--c-primary); }

.flow-steps {
    list-style: none; padding: 0;
    display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px;
}
.flow-steps li {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    padding: 22px 22px 24px;
}
.step-no { font-size: 26px; font-weight: 700; color: var(--c-primary-line); letter-spacing: 1px; }
.flow-steps h4 { font-size: 15px; margin: 8px 0 6px; }
.flow-steps p { font-size: 13px; color: var(--c-text-2); }

.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 18px; align-items: start; }

.notice-list { padding-left: 18px; font-size: 13px; color: var(--c-text-2); line-height: 2; }
.notice-list li { margin-bottom: 2px; }

/* ==========================================================================
   3. 内页 Banner（查询 / 入驻）
   ========================================================================== */
.page-banner {
    color: #fff;
    padding: 28px 0 34px;
    background: linear-gradient(135deg, #10305f 0%, var(--c-primary) 58%, #3f86e6 100%);
}
.banner-search { /* 沿用默认蓝色 */ }
.banner-personal { background: linear-gradient(135deg, #10305f 0%, #1c5fd0 56%, #4a90e8 100%); }
.banner-enterprise { background: linear-gradient(135deg, #103b52 0%, #186a8f 56%, #2f8fbd 100%); }

.breadcrumb { display: flex; gap: 8px; font-size: 12px; color: rgba(255, 255, 255, .7); margin-bottom: 14px; }
.breadcrumb a { color: rgba(255, 255, 255, .88); }
.breadcrumb a:hover { color: #fff; }
.page-banner h1 { color: #fff; font-size: 28px; letter-spacing: .5px; }
.page-banner p { color: rgba(255, 255, 255, .88); font-size: 14px; margin-top: 8px; max-width: 820px; }

.search-box { display: flex; gap: 10px; margin-top: 22px; max-width: 640px; }
.search-box .input { height: 44px; border: none; font-size: 14px; }
.search-box .btn { height: 44px; padding: 0 26px; background: #0f2f66; border-color: #0f2f66; color: #fff; }
.search-box .btn:hover:not(:disabled) { background: #0a2450; border-color: #0a2450; color: #fff; }

/* ==========================================================================
   4. 入会申请页
   ========================================================================== */
.join-layout {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 20px;
    align-items: start;
    margin-top: 22px;
    padding-bottom: 30px;
}
.join-aside .card + .card { margin-top: 14px; }
.aside-switch .card-body { text-align: center; }
.aside-switch p { font-size: 13px; color: var(--c-text-2); margin-bottom: 10px; }
.mini-steps { padding-left: 20px; font-size: 13px; color: var(--c-text-2); line-height: 2.1; }
.join-main .card-body { padding: 20px 22px 24px; }

.result-panel { text-align: center; padding: 18px 10px 4px; }
.result-icon {
    width: 58px; height: 58px; border-radius: 50%;
    background: var(--c-success-soft); color: var(--c-success);
    font-size: 27px; display: grid; place-items: center;
    margin: 0 auto 14px;
}
.result-panel h2 { font-size: 20px; }
.result-panel p { color: var(--c-text-2); font-size: 13px; margin-top: 6px; }

/* ==========================================================================
   5. 通用容器 / 页头
   ========================================================================== */
.card {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}
.card-header {
    padding: 14px 18px;
    border-bottom: 1px solid var(--c-border);
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.card-header h3 { font-size: 15px; }
.card-header .card-sub { font-size: 12px; color: var(--c-text-3); font-weight: 400; }
.card-body { padding: 18px; }
.card + .card { margin-top: 16px; }

.page-header { margin: 22px 0 16px; }
.page-header h1 { font-size: 22px; }
.page-header p { color: var(--c-text-2); font-size: 13px; margin-top: 4px; }

.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }

/* ==========================================================================
   6. 按钮
   ========================================================================== */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--c-border-strong);
    background: var(--c-surface);
    color: var(--c-text);
    font-size: 13px; font-family: inherit;
    cursor: pointer;
    transition: all .15s;
    white-space: nowrap;
    line-height: 1.4;
}
.btn:hover:not(:disabled) { border-color: var(--c-primary); color: var(--c-primary); }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.btn-primary { background: var(--c-primary); border-color: var(--c-primary); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--c-primary-dark); border-color: var(--c-primary-dark); color: #fff; }
.btn-success { background: var(--c-success); border-color: var(--c-success); color: #fff; }
.btn-success:hover:not(:disabled) { filter: brightness(.92); color: #fff; }
.btn-danger { background: var(--c-danger); border-color: var(--c-danger); color: #fff; }
.btn-danger:hover:not(:disabled) { filter: brightness(.92); color: #fff; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--c-text-2); }
.btn-ghost:hover:not(:disabled) { background: var(--c-primary-soft); color: var(--c-primary); border-color: transparent; }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-xs { padding: 3px 8px; font-size: 12px; border-radius: 5px; }
.btn-block { width: 100%; }
.btn-group { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ==========================================================================
   7. 表单
   ========================================================================== */
.field { margin-bottom: 14px; }
.field > label,
.label { display: block; font-size: 13px; color: var(--c-text-2); margin-bottom: 5px; font-weight: 500; }
.label .req { color: var(--c-danger); margin-left: 2px; }

.input, .select, .textarea {
    width: 100%;
    padding: 8px 11px;
    border: 1px solid var(--c-border-strong);
    border-radius: var(--radius-sm);
    font-size: 13px; font-family: inherit;
    color: var(--c-text);
    background: var(--c-surface);
    transition: border-color .15s, box-shadow .15s;
}
.input:focus, .select:focus, .textarea:focus {
    outline: none;
    border-color: var(--c-primary);
    box-shadow: 0 0 0 3px rgba(28, 95, 208, .12);
}
.input:disabled, .select:disabled, .textarea:disabled { background: var(--c-surface-2); color: var(--c-text-3); cursor: not-allowed; }
.textarea { resize: vertical; min-height: 86px; }
.select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%235a6478' d='M2 4l4 4 4-4z'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 10px center; padding-right: 28px;
}

.validation-message { color: var(--c-danger); font-size: 12px; margin-top: 4px; display: block; }
.field-hint { font-size: 12px; color: var(--c-text-3); margin-top: 4px; }

.checkbox { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; font-size: 13px; user-select: none; }
.checkbox input { width: 15px; height: 15px; accent-color: var(--c-primary); cursor: pointer; }

.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 0 16px; }
.form-grid .span-2 { grid-column: span 2; }
@media (max-width: 640px) { .form-grid .span-2 { grid-column: span 1; } }

.form-section-title {
    display: flex; align-items: center; gap: 8px;
    font-size: 13px; font-weight: 600; color: var(--c-text);
    margin: 20px 0 12px; padding-bottom: 8px; border-bottom: 1px dashed var(--c-border);
}
.form-section-title:first-child { margin-top: 0; }
.form-section-title::before { content: ""; width: 3px; height: 14px; border-radius: 2px; background: var(--c-primary); }

/* ==========================================================================
   8. 徽标
   ========================================================================== */
.badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 2px 9px; border-radius: 999px;
    font-size: 12px; line-height: 1.7; white-space: nowrap;
    background: var(--c-surface-2); color: var(--c-text-2); border: 1px solid var(--c-border);
}
.badge-primary { background: var(--c-primary-soft); color: var(--c-primary); border-color: var(--c-primary-line); }
.badge-success { background: var(--c-success-soft); color: var(--c-success); border-color: #bfe3d0; }
.badge-warning { background: var(--c-warning-soft); color: var(--c-warning); border-color: #f0dcb4; }
.badge-danger { background: var(--c-danger-soft); color: var(--c-danger); border-color: #f5cdc7; }
/* 固定枚举值的扩展配色（见 EnumBadge.cs） */
.badge-plain { background: var(--c-surface-2); color: var(--c-text-2); border-color: var(--c-border); }
.badge-muted { background: #f1f3f7; color: var(--c-text-3); border-color: #e3e7ee; }
.badge-info { background: #e7f3fb; color: #1a6ea8; border-color: #c4e0f2; }
.badge-teal { background: #e2f5f1; color: #0f7b6c; border-color: #bfe6de; }
.badge-purple { background: #efe9fd; color: #6b3fc4; border-color: #dcd0f8; }
.badge-pink { background: #fdeaf3; color: #b5327b; border-color: #f7d0e2; }
.badge-orange { background: #fdeee0; color: #b3651a; border-color: #f5d7b7; }

/* ==========================================================================
   9. 记录列表（卡片式多行字段）
   替代原先的宽表格：会员有 28 个字段，横着铺必然横向滚动；
   改为「一条记录 = 一张卡片 + 多行字段网格」，一行放不下的字段自动折行。
   ========================================================================== */
.grid-toolbar {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    padding: 12px 16px; border-bottom: 1px solid var(--c-border);
}
.grid-toolbar-spacer { flex: 1; }
.toolbar-hint { font-size: 12.5px; color: var(--c-text-3); }
.toolbar-hint strong { color: var(--c-text); }

/* ---------- 筛选条 ---------- */
.filter-bar {
    display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap;
    padding: 12px 16px; background: var(--c-surface-2);
    border-bottom: 1px solid var(--c-border);
}
.filter-item { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.filter-item > label { font-size: 12px; color: var(--c-text-3); }
.filter-item .input, .filter-item .select { min-width: 124px; }
.filter-item .input { padding: 6px 10px; }
.filter-item .select { padding: 6px 28px 6px 10px; }
.filter-item.grow { flex: 1 1 240px; }
.sort-group { display: flex; align-items: center; gap: 6px; }
.sort-group .select { min-width: 138px; }

/* ---------- 记录卡片 ---------- */
.record-list {
    display: flex; flex-direction: column; gap: 10px;
    padding: 14px 16px; background: var(--c-surface-2);
}
.record {
    background: var(--c-surface); border: 1px solid var(--c-border);
    border-radius: var(--radius); box-shadow: var(--shadow-sm);
    transition: border-color .15s, box-shadow .15s;
}
.record:hover { border-color: var(--c-primary-line); box-shadow: var(--shadow); }

.record-head {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    padding: 9px 14px; border-bottom: 1px solid var(--c-border);
    background: linear-gradient(90deg, var(--c-primary-soft) 0%, transparent 72%);
}
.rec-no {
    flex: 0 0 auto; min-width: 26px; height: 26px; padding: 0 7px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 999px; background: var(--c-primary); color: #fff;
    font-size: 12px; font-weight: 600;
}
.rec-name { font-size: 15px; font-weight: 600; }
.rec-code {
    font-size: 12px; color: var(--c-text-3);
    font-family: ui-monospace, Consolas, "Courier New", monospace;
}
.rec-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; flex-wrap: nowrap; }
.record-body { padding: 12px 14px; }

/* ---------- 字段网格：一行放不下就折到下一行 ---------- */
.field-grid {
    display: grid; gap: 8px 18px;
    grid-template-columns: repeat(auto-fill, minmax(196px, 1fr));
}
.field-grid.dense { gap: 6px 16px; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); }
.ff { display: flex; align-items: baseline; gap: 6px; min-width: 0; font-size: 13px; }
.field-grid.dense .ff { font-size: 12px; gap: 5px; }
.ff-k { flex: 0 0 auto; color: var(--c-text-3); white-space: nowrap; }
.ff-v { min-width: 0; color: var(--c-text); overflow-wrap: anywhere; }
.ff-long { grid-column: 1 / -1; }
.mist { color: var(--c-text-3); }

.field-section + .field-section { margin-top: 14px; }
.field-section > h5 { font-size: 13px; color: var(--c-text-2); margin-bottom: 8px; }

.grid-footer {
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
    padding: 12px 16px; border-top: 1px solid var(--c-border);
    font-size: 13px; color: var(--c-text-2);
}
.grid-footer .spacer { flex: 1; }

.pager { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.pager button {
    min-width: 30px; height: 30px; padding: 0 8px;
    border: 1px solid var(--c-border); background: var(--c-surface); color: var(--c-text-2);
    border-radius: var(--radius-sm); cursor: pointer; font-size: 13px; font-family: inherit;
}
.pager button:hover:not(:disabled) { border-color: var(--c-primary); color: var(--c-primary); }
.pager button.active { background: var(--c-primary); border-color: var(--c-primary); color: #fff; }
.pager button:disabled { opacity: .45; cursor: not-allowed; }

.page-size { display: flex; align-items: center; gap: 6px; }
.page-size .select { width: auto; padding: 4px 26px 4px 8px; }

/* ==========================================================================
   10. 抽屉 / 弹窗
   ========================================================================== */
.overlay {
    position: fixed; inset: 0; background: rgba(16, 24, 40, .45);
    display: flex; align-items: center; justify-content: center;
    z-index: 100; padding: 20px; animation: fade .15s ease;
}
@keyframes fade { from { opacity: 0 } to { opacity: 1 } }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.98) } to { opacity: 1; transform: none } }

.modal {
    background: var(--c-surface); border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg); width: 100%; max-width: 560px;
    max-height: calc(100vh - 40px); display: flex; flex-direction: column;
    animation: pop .18s ease;
}
.modal.modal-sm { max-width: 420px; }
.modal.modal-lg { max-width: 900px; }

.modal-header {
    padding: 16px 20px; border-bottom: 1px solid var(--c-border);
    display: flex; align-items: center; gap: 10px;
}
.modal-header h3 { font-size: 16px; flex: 1; }
.modal-body { padding: 20px; overflow-y: auto; flex: 1; }
.modal-footer {
    padding: 14px 20px; border-top: 1px solid var(--c-border);
    display: flex; justify-content: flex-end; gap: 10px; background: var(--c-surface-2);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.icon-btn {
    border: none; background: transparent; cursor: pointer; font-size: 18px;
    color: var(--c-text-3); line-height: 1; padding: 4px 6px; border-radius: 6px;
}
.icon-btn:hover { background: var(--c-surface-2); color: var(--c-text); }

/* 右侧抽屉 */
.overlay.drawer-wrap { padding: 0; justify-content: flex-end; }
.drawer {
    background: var(--c-surface); height: 100%; width: 100%; max-width: 460px;
    display: flex; flex-direction: column; box-shadow: var(--shadow-lg);
    animation: slideIn .2s ease;
}
@keyframes slideIn { from { transform: translateX(30px); opacity: .6 } to { transform: none; opacity: 1 } }
.drawer-header { padding: 16px 20px; border-bottom: 1px solid var(--c-border); display: flex; align-items: center; gap: 10px; }
.drawer-header h3 { font-size: 15px; flex: 1; }
.drawer-body { padding: 18px 20px; overflow-y: auto; flex: 1; }
.drawer-footer { padding: 14px 20px; border-top: 1px solid var(--c-border); display: flex; justify-content: flex-end; gap: 10px; }

/* ==========================================================================
   11. Toast
   ========================================================================== */
.toast-host {
    position: fixed; top: 18px; right: 18px; z-index: 200;
    display: flex; flex-direction: column; gap: 10px; width: 320px; max-width: calc(100vw - 36px);
}
.toast {
    background: var(--c-surface); border: 1px solid var(--c-border);
    border-left: 4px solid var(--c-primary);
    border-radius: var(--radius); box-shadow: var(--shadow);
    padding: 12px 14px; display: flex; gap: 10px; align-items: flex-start;
    animation: pop .18s ease;
}
.toast.success { border-left-color: var(--c-success); }
.toast.error { border-left-color: var(--c-danger); }
.toast.warning { border-left-color: var(--c-warning); }
.toast-icon { font-size: 15px; line-height: 1.4; }
.toast-title { font-size: 13px; font-weight: 600; }
.toast-message { font-size: 12px; color: var(--c-text-2); margin-top: 2px; word-break: break-word; }
.toast-close { margin-left: auto; }

/* ==========================================================================
   12. 会员卡片
   ========================================================================== */
.member-card {
    background: var(--c-surface); border: 1px solid var(--c-border);
    border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden;
}
.member-card + .member-card { margin-top: 14px; }

.member-card-head {
    padding: 14px 18px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    background: linear-gradient(90deg, var(--c-primary-soft) 0%, transparent 70%);
    border-bottom: 1px solid var(--c-border);
}
.member-card-head .name { font-size: 16px; font-weight: 600; }
.member-card-body { padding: 16px 18px; }
/* 字段网格由 .field-grid 统一渲染（见第 9 节），卡片内只需控制间距 */
.member-card-section h5 { font-size: 13px; color: var(--c-text-2); margin-bottom: 10px; }
/* 放在记录列表里时由 .record-list 的 gap 控制间距，避免叠加 */
.record-list > .member-card + .member-card { margin-top: 0; }
.masked { color: var(--c-text-3); font-style: italic; }

.attach-list { display: flex; flex-wrap: wrap; gap: 12px; }
.attach-thumb {
    width: 128px; border: 1px solid var(--c-border); border-radius: var(--radius-sm);
    overflow: hidden; background: var(--c-surface-2); cursor: zoom-in; position: relative;
}
.attach-thumb img { width: 100%; height: 96px; object-fit: cover; display: block; }
.attach-thumb .attach-name { font-size: 11px; padding: 5px 7px; color: var(--c-text-2); word-break: break-all; }
.attach-file {
    display: flex; align-items: center; gap: 8px; padding: 9px 12px;
    border: 1px solid var(--c-border); border-radius: var(--radius-sm);
    background: var(--c-surface-2); font-size: 13px;
}
.attach-file .attach-del { margin-left: auto; }

/* ==========================================================================
   13. 上传组件
   ========================================================================== */
.uploader { border: 1px dashed var(--c-border-strong); border-radius: var(--radius); background: var(--c-surface-2); padding: 16px; }
.uploader-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.uploader-tip { font-size: 12px; color: var(--c-text-3); }
.upload-list { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.upload-item {
    display: flex; align-items: center; gap: 10px; padding: 8px 12px;
    background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius-sm);
    font-size: 13px;
}
.upload-item .u-name { flex: 0 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload-item .u-bar { flex: 1; height: 5px; background: var(--c-border); border-radius: 3px; overflow: hidden; min-width: 60px; }
.upload-item .u-bar i { display: block; height: 100%; background: var(--c-primary); transition: width .2s; }
.upload-item .u-state { font-size: 12px; color: var(--c-text-3); flex: 0 0 auto; }
.upload-item.failed { border-color: #f5cdc7; background: var(--c-danger-soft); }
.upload-item.done .u-bar i { background: var(--c-success); }

/* ==========================================================================
   14. 空状态 / 加载 / 提示条 / 统计
   ========================================================================== */
.empty-state { text-align: center; padding: 56px 20px; color: var(--c-text-3); }
.empty-state h2 { font-size: 30px; color: var(--c-text-3); }
.empty-state .empty-icon { font-size: 40px; margin-bottom: 8px; opacity: .6; }
.empty-state p { margin: 6px 0 14px; }

.spinner {
    width: 22px; height: 22px; border: 2px solid var(--c-border);
    border-top-color: var(--c-primary); border-radius: 50%;
    animation: spin .7s linear infinite; margin: 0 auto;
}
@keyframes spin { to { transform: rotate(360deg) } }

.alert { padding: 10px 14px; border-radius: var(--radius-sm); font-size: 13px; border: 1px solid transparent; }
.alert-danger { background: var(--c-danger-soft); border-color: #f5cdc7; color: #8f2a1e; }
.alert-info { background: var(--c-primary-soft); border-color: var(--c-primary-line); color: #17427f; }
.alert-success { background: var(--c-success-soft); border-color: #bfe3d0; color: #0f6238; }
.alert + .field, .alert + .form-grid { margin-top: 14px; }

.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; }
.stat { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius); padding: 16px 18px; }
.stat .k { font-size: 12px; color: var(--c-text-3); }
.stat .v { font-size: 26px; font-weight: 600; margin-top: 2px; }
.stat.primary .v { color: var(--c-primary); }
.stat.warning .v { color: var(--c-warning); }
.stat.success .v { color: var(--c-success); }

/* ==========================================================================
   15. 图片查看 / 重连提示
   ========================================================================== */
.lightbox {
    position: fixed; inset: 0; background: rgba(10, 14, 22, .9); z-index: 300;
    display: flex; align-items: center; justify-content: center; padding: 30px; cursor: zoom-out;
}
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 8px; box-shadow: var(--shadow-lg); }

.reconnect-modal {
    display: none; position: fixed; inset: 0; background: rgba(16, 24, 40, .6);
    z-index: 400; align-items: center; justify-content: center;
}
.reconnect-modal.show, .reconnect-modal.visible { display: flex; }
.reconnect-card { background: #fff; border-radius: var(--radius-lg); padding: 26px 30px; text-align: center; min-width: 300px; }
.reconnect-card p { margin-top: 12px; font-size: 13px; color: var(--c-text-2); }

/* ==========================================================================
   16. 404 页面
   ========================================================================== */
.error-page { text-align: center; padding: 70px 20px 90px; }
.error-code { font-size: 84px; font-weight: 700; line-height: 1; letter-spacing: 4px; color: var(--c-primary-line); }
.error-page h1 { font-size: 24px; margin-top: 12px; }
.error-page p { color: var(--c-text-2); font-size: 14px; margin-top: 8px; }

/* ==========================================================================
   17. 响应式
   ========================================================================== */
@media (max-width: 1180px) {
    .nav-link { padding: 9px 11px; font-size: 14px; }
}

@media (max-width: 980px) {
    .hero-inner { grid-template-columns: 1fr; gap: 30px; }
    .hero h1 { font-size: 31px; }
    .hero { padding: 40px 0 46px; }
    .join-layout { grid-template-columns: 1fr; }
    .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
    .nav-toggle { display: inline-flex; }
    .site-nav {
        display: none;
        position: absolute;
        top: 100%; left: 0; right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
        margin-left: 0;
        padding: 10px 20px 16px;
        background: var(--c-surface);
        border-top: 1px solid var(--c-border);
        border-bottom: 1px solid var(--c-border);
        box-shadow: var(--shadow);
    }
    .site-nav.open { display: flex; }
    .nav-link { width: 100%; padding: 11px 12px; }
    .nav-link.active::after { display: none; }
    .nav-link.active { background: var(--c-primary-soft); }

    .strip-brand, .strip-note { display: none; }
    .container { padding: 0 14px; }
    .page-banner { padding: 22px 0 26px; }
    .page-banner h1 { font-size: 22px; }
    .hero-panel { padding: 18px; }
    .search-box { flex-direction: column; }
    .search-box .input, .search-box .btn { height: 42px; width: 100%; }
    .overlay { padding: 10px; }
    .modal { max-height: calc(100vh - 20px); }

    /* 记录卡片：窄屏字段改为两列自动折行，操作按钮另起一行 */
    .field-grid, .field-grid.dense { grid-template-columns: repeat(auto-fill, minmax(142px, 1fr)); gap: 6px 12px; }
    .record-head { align-items: flex-start; }
    .rec-actions { width: 100%; margin-left: 0; justify-content: flex-start; flex-wrap: wrap; }
    .filter-item { flex: 1 1 100%; }
    .filter-item.grow { flex: 1 1 100%; }
    .filter-item .input, .filter-item .select { width: 100%; }
    .sort-group { width: 100%; }
    .sort-group .select { flex: 1; }
    .record-list { padding: 12px; }
    .grid-toolbar, .filter-bar, .grid-footer { padding: 12px; }
}

@media (max-width: 640px) {
    .footer-inner { grid-template-columns: 1fr; gap: 22px; padding: 30px 14px 24px; }
    .service-card p { min-height: 0; }
    .section { margin-top: 34px; }
    .rec-name { font-size: 14px; }
    .page-size { display: none; }
}
