﻿/* ============================================================
   证件申请管理系统 - 响应式样式（PC / 手机共用）
   配色：清爽浅蓝
   ============================================================ */

:root {
    --primary: #1668c1;
    --primary-dark: #0f56a5;
    --primary-light: #eaf3fd;
    --primary-soft: #f4f9ff;
    --accent: #3d93ea;
    --text: #22303f;
    --muted: #6c7f96;
    --border: #dbe7f4;
    --bg: #f3f7fc;
    --white: #ffffff;
    --success: #17a05e;
    --success-bg: #e8f8f0;
    --danger: #d24545;
    --danger-bg: #fdeeee;
    --warning: #d98616;
    --warning-bg: #fff5e6;
    --radius: 12px;
    --shadow: 0 4px 16px rgba(22, 104, 193, 0.08);
    --shadow-hover: 0 8px 24px rgba(22, 104, 193, 0.14);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
}

body {
    font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    -webkit-text-size-adjust: 100%;
    overflow-x: hidden;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }

.container {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ---------------- 顶部导航 ---------------- */
.app-header {
    background: linear-gradient(120deg, #145ba9 0%, #2f83d8 55%, #4aa0ef 100%);
    color: #fff;
    box-shadow: 0 2px 12px rgba(16, 76, 145, 0.22);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 28px;
    min-height: 68px;
    flex-wrap: wrap;
    padding-top: 14px;
    padding-bottom: 12px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    flex: 0 0 auto;
}
.brand:hover { color: #fff; }

.brand-logo {
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    display: block;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 2px 6px rgba(11, 60, 112, 0.28);
}

.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text strong { font-size: 16px; letter-spacing: 0.4px; }
.brand-text small { font-size: 10px; opacity: 0.7; letter-spacing: 1px; text-transform: uppercase; }

.app-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1 1 auto;
    flex-wrap: wrap;
}
.app-nav a {
    color: rgba(255, 255, 255, 0.9);
    padding: 7px 14px;
    border-radius: 999px;
    font-size: 14px;
    white-space: nowrap;
}
.app-nav a:hover {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
}

.user-area {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}
.user-name { font-size: 14px; font-weight: 600; }
.user-role {
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
}
.logout-form { display: inline; margin: 0; }
.link-btn {
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.5);
    color: #fff;
    padding: 4px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
}
.link-btn:hover { background: rgba(255, 255, 255, 0.16); }

/* ---------------- 页面主体 ---------------- */
.page-body { padding-top: 52px; padding-bottom: 46px; }

.page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}
.page-head h1 {
    font-size: 22px;
    margin: 0 0 4px;
    font-weight: 700;
    color: #16324f;
}
.page-head .sub { color: var(--muted); font-size: 13px; margin: 0; }
.page-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 22px 24px;
    margin-bottom: 20px;
}

.card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.card-head h2 {
    font-size: 16px;
    margin: 0;
    font-weight: 700;
    color: #1c3a5c;
    padding-left: 10px;
    border-left: 4px solid var(--accent);
}
.card-head .hint { font-size: 12px; color: var(--muted); }

.card-sub { color: var(--muted); font-size: 13px; margin: -8px 0 16px; }

/* ---------------- 统计卡 ---------------- */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}
.stat-grid > * { min-width: 0; }
.stat-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 20px;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.2s;
}
.stat-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.stat-card::before {
    content: "";
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, var(--accent), var(--primary));
}
.stat-card .stat-label { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.stat-card .stat-value { font-size: 28px; font-weight: 700; color: var(--primary); line-height: 1.2; }
.stat-card .stat-foot { font-size: 12px; color: var(--muted); margin-top: 6px; }

.stat-card.stat-warning::before { background: linear-gradient(180deg, #f0b04a, #d98616); }
.stat-card.stat-warning .stat-value { color: var(--warning); }
.stat-card.stat-success::before { background: linear-gradient(180deg, #45c98b, #129455); }
.stat-card.stat-success .stat-value { color: var(--success); }

/* ---------------- 表格 ---------------- */
.table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 10px;
    border: 1px solid var(--border);
}
table.data-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 720px;
    background: #fff;
}
.data-table th,
.data-table td {
    padding: 11px 14px;
    text-align: left;
    border-bottom: 1px solid #edf3fa;
    font-size: 13.5px;
    vertical-align: middle;
    white-space: nowrap;
}
.data-table th {
    background: #f2f8fe;
    color: #315474;
    font-weight: 600;
    font-size: 13px;
}
.data-table tbody tr:hover { background: #f8fbff; }
.data-table td.wrap { white-space: normal; min-width: 120px; }
.data-table td.actions { white-space: nowrap; }
.empty-row { text-align: center; color: var(--muted); padding: 36px 0 !important; }

.thumb {
    width: 42px;
    height: 54px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: #f6f9fd;
    display: block;
}
.thumb-empty {
    width: 42px; height: 54px;
    border-radius: 6px;
    border: 1px dashed var(--border);
    color: var(--muted);
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f9fcff;
}

/* ---------------- 徽章 ---------------- */
.badge {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.6;
}
.badge-pending { color: var(--warning); background: var(--warning-bg); }
.badge-approved { color: var(--success); background: var(--success-bg); }
.badge-rejected { color: var(--danger); background: var(--danger-bg); }
.badge-muted { color: var(--muted); background: #eef3f9; }
.badge-blue { color: var(--primary); background: var(--primary-light); }

/* ---------------- 按钮 ---------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 18px;
    border-radius: 8px;
    border: 1px solid transparent;
    background: var(--primary);
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    font-family: inherit;
    line-height: 1.4;
    transition: background 0.15s, box-shadow 0.15s;
    text-align: center;
}
.btn:hover { background: var(--primary-dark); color: #fff; box-shadow: 0 4px 12px rgba(22, 104, 193, 0.25); }
.btn:active { transform: translateY(1px); }

.btn-secondary {
    background: #fff;
    color: var(--primary);
    border-color: #b8d4f3;
}
.btn-secondary:hover { background: var(--primary-light); color: var(--primary-dark); box-shadow: none; }

.btn-danger { background: #fff; color: var(--danger); border-color: #f1bfbf; }
.btn-danger:hover { background: var(--danger-bg); color: var(--danger); box-shadow: none; }

.btn-success { background: #fff; color: var(--success); border-color: #b7e6cd; }
.btn-success:hover { background: var(--success-bg); color: var(--success); box-shadow: none; }

.btn-sm { padding: 5px 12px; font-size: 12.5px; border-radius: 6px; }
.btn-block { width: 100%; }
.btn[disabled], .btn.disabled { opacity: 0.55; cursor: not-allowed; }

.inline-form { display: inline; margin: 0; }

/* ---------------- 提示 ---------------- */
.alert {
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 18px;
    font-size: 14px;
    border: 1px solid transparent;
    display: flex;
    align-items: center;
    gap: 8px;
}
.alert-success { background: var(--success-bg); color: #12714a; border-color: #c5eed9; }
.alert-danger { background: var(--danger-bg); color: #a52d2d; border-color: #f5cfcf; }
.alert-info { background: var(--primary-light); color: var(--primary-dark); border-color: #cfe4fa; }
.alert-warning { background: var(--warning-bg); color: #a9630f; border-color: #f6dfb8; }

.field-error { color: var(--danger); font-size: 12.5px; margin-top: 4px; display: block; }

/* ---------------- 表单 ---------------- */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 22px;
}
.form-grid > * { min-width: 0; }
.form-item { display: flex; flex-direction: column; }
/* display:flex 会盖掉 [hidden]，需要显式声明 */
.form-item[hidden] { display: none; }
.form-item.full { grid-column: 1 / -1; }
.form-item label {
    font-size: 13px;
    color: #3b5471;
    margin-bottom: 6px;
    font-weight: 600;
}
.form-item label .req { color: var(--danger); margin-left: 3px; }

input[type="text"], input[type="password"], input[type="number"], input[type="email"],
input[type="tel"], select, textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    color: var(--text);
    background: #fff;
    transition: border-color 0.15s, box-shadow 0.15s;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(61, 147, 234, 0.16);
}
input[readonly] { background: #f5f9fe; color: var(--muted); }
textarea { min-height: 84px; resize: vertical; }

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid #edf3fa;
    flex-wrap: wrap;
}

.photo-upload {
    display: flex;
    gap: 18px;
    align-items: center;
    flex-wrap: wrap;
}
.photo-preview {
    width: 96px;
    height: 128px;
    border-radius: 8px;
    border: 1px dashed #b9d5f2;
    background: #f7fbff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    font-size: 12px;
    overflow: hidden;
    flex: 0 0 auto;
}
.photo-preview img { width: 100%; height: 100%; object-fit: cover; }
.photo-meta { font-size: 12.5px; color: var(--muted); }
.photo-meta .hint { display: block; margin-top: 4px; }

/* 配额表格 */
.quota-table { width: 100%; border-collapse: collapse; }
.quota-table th, .quota-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #edf3fa;
    font-size: 13.5px;
    text-align: left;
}
.quota-table th { background: #f2f8fe; color: #315474; font-weight: 600; }
.quota-table input[type="number"] { width: 110px; padding: 7px 10px; }
.quota-table .used { color: var(--muted); }
.quota-table .remain { font-weight: 700; color: var(--primary); }
.quota-table .remain.zero { color: var(--danger); }

/* 进度条 */
.progress {
    height: 10px;
    background: #eaf2fb;
    border-radius: 999px;
    overflow: hidden;
    margin-top: 8px;
}
.progress > span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--primary));
    border-radius: 999px;
}
.progress.warn > span { background: linear-gradient(90deg, #f0b04a, #d98616); }
.progress.full > span { background: linear-gradient(90deg, #e37878, #cf4444); }

/* ---------------- 筛选栏 ---------------- */
.filter-bar {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    flex-wrap: wrap;
    margin-bottom: 18px;
    padding: 16px 18px;
    background: #f8fbff;
    border: 1px solid var(--border);
    border-radius: 10px;
}
.filter-bar .f-item { display: flex; flex-direction: column; gap: 4px; }
.filter-bar .f-item label { font-size: 12px; color: var(--muted); }
.filter-bar input, .filter-bar select { min-width: 150px; padding: 8px 10px; }
.filter-bar .btn { padding: 8px 16px; }

/* ---------------- 分页 ---------------- */
.pager {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 18px;
    flex-wrap: wrap;
}
.pg-btn {
    min-width: 34px;
    height: 32px;
    padding: 0 10px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: #fff;
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
}
.pg-btn:hover { background: var(--primary-light); border-color: #b8d4f3; }
.pg-current {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    font-weight: 600;
}
.pg-info { margin-left: 8px; color: var(--muted); font-size: 12.5px; }

/* ---------------- 登录页 ---------------- */
.auth-body {
    min-height: 100vh;
    margin: 0;
    background:
        radial-gradient(circle at 12% 12%, rgba(74, 160, 239, 0.18), transparent 42%),
        radial-gradient(circle at 88% 88%, rgba(22, 104, 193, 0.14), transparent 45%),
        linear-gradient(160deg, #eef6ff 0%, #f7fbff 48%, #e9f3fd 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 28px 16px 60px;
}
.auth-wrap { width: 100%; max-width: 420px; }
.auth-card {
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 18px 48px rgba(20, 84, 154, 0.16);
    padding: 36px 34px 30px;
    border: 1px solid rgba(255, 255, 255, 0.9);
}
.auth-head { text-align: center; margin-bottom: 26px; }

/* 登录页品牌区：白底 logo 与系统名称横排 */
.auth-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap;
    margin-bottom: 8px;
}

.auth-brand .auth-logo {
    width: 60px;
    height: 60px;
    margin: 0 12px 0 0;
    flex: 0 0 auto;
    display: block;
}

.auth-brand h1 {
    font-size: 20px;
    margin: 0;
    color: #16324f;
    white-space: nowrap;
}

.auth-head p { margin: 0; color: var(--muted); font-size: 13px; }

.auth-form .form-item { margin-bottom: 16px; }
.auth-form .btn { margin-top: 8px; padding: 11px 18px; font-size: 15px; }

.auth-tip {
    margin-top: 18px;
    font-size: 12.5px;
    color: var(--muted);
    text-align: center;
    line-height: 1.8;
}
.auth-footer { color: #7890a8; font-size: 12.5px; margin-top: 22px; }

/* ---------------- 其他 ---------------- */
.info-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px 24px;
}
.info-list > * { min-width: 0; }
.info-item { font-size: 13.5px; }
.info-item .k { color: var(--muted); font-size: 12.5px; display: block; }
.info-item .v { color: var(--text); font-weight: 600; word-break: break-all; }

.quota-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}
.quota-cards > * { min-width: 0; }
.quota-card {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px 16px;
    background: #fbfdff;
}
.quota-card .qc-name { font-weight: 700; color: #1c3a5c; font-size: 14px; margin-bottom: 6px; }
.quota-card .qc-num { font-size: 13px; color: var(--muted); }
.quota-card .qc-num strong { color: var(--primary); font-size: 17px; }
.quota-card .qc-num .of { margin: 0 3px; }

.forbidden-box { text-align: center; padding: 50px 20px; }
.forbidden-box .fb-code { font-size: 56px; font-weight: 800; color: #cfe2f6; line-height: 1; }
.forbidden-box h2 { margin: 12px 0 6px; font-size: 18px; color: #254668; }
.forbidden-box p { color: var(--muted); margin: 0 0 18px; }

.text-muted { color: var(--muted); }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }

/* ---------------- 移动端适配 ---------------- */
.hide-pc { display: none; }
@media (max-width: 900px) {
    .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .quota-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .info-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
    .container { padding: 0 14px; }
    .header-inner {
        min-height: 56px;
        gap: 8px 12px;
        align-items: center;
        padding-top: 18px;
        padding-bottom: 12px;
    }
    .brand-logo { width: 28px; height: 28px; border-radius: 7px; }
    .brand-text strong { font-size: 15px; }
    .brand-text small { display: none; }
    .app-nav {
        order: 3;
        width: 100%;
        gap: 2px;
        padding-bottom: 6px;
        overflow-x: auto;
    }
    .app-nav a { padding: 5px 10px; font-size: 13px; }
    .user-area { margin-left: auto; gap: 6px; }
    .user-name { max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .user-role { display: none; }

    .page-body { padding-top: 62px; padding-bottom: 30px; }
    .page-head h1 { font-size: 19px; }
    .page-actions { width: 100%; }
    .page-actions .btn { flex: 1 1 auto; }

    .card { padding: 16px; border-radius: 10px; }
    .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .stat-card { padding: 14px; }
    .stat-card .stat-value { font-size: 23px; }

    .form-grid { grid-template-columns: minmax(0, 1fr); gap: 13px; }
    .quota-cards { grid-template-columns: minmax(0, 1fr); }
    .info-list { grid-template-columns: minmax(0, 1fr); }
    .filter-bar { padding: 12px; gap: 10px; }
    .filter-bar .f-item { flex: 1 1 100%; }
    .filter-bar input, .filter-bar select { min-width: 0; width: 100%; }
    .filter-bar .btn { width: 100%; }

    .form-actions { gap: 10px; }
    .form-actions .btn { flex: 1 1 100%; }

    .data-table th, .data-table td { padding: 9px 10px; font-size: 13px; }
    .photo-preview { width: 84px; height: 112px; }

    .hide-sm { display: none !important; }
    table.data-table { min-width: 0; }
    .data-table th { width: auto !important; }
    .data-table td { white-space: normal; word-break: break-word; }
    .data-table td.wrap { min-width: 0; }
    .data-table td.actions { white-space: nowrap; }
    .data-table .btn-sm { padding: 4px 6px; font-size: 11.5px; }
    /* 手机端表格宽度紧张：驳回原因与审核时间小字隐藏，保证“审核”按钮完整可见 */
    .data-table .review-note,
    .data-table td.status-cell .region-line { display: none; }
    .data-table td.status-cell { min-width: 52px; }
    .data-table .badge { font-size: 11.5px; padding: 2px 7px; white-space: nowrap; }
    .data-table th, .data-table td { padding: 8px 4px; }
    .hide-pc { display: inline; }
    .data-table td.name-cell { min-width: 96px; }
    .quota-table th, .quota-table td { padding: 8px 6px; font-size: 13px; }
    .quota-table th { white-space: nowrap; }
    .quota-table input[type="number"] { width: 76px; padding: 6px 8px; }

    .auth-card { padding: 28px 22px 24px; border-radius: 14px; }
    .auth-brand .auth-logo { width: 52px; height: 52px; margin-right: 10px; }
    .auth-brand h1 { font-size: 18px; }
}

@media (max-width: 380px) {
    .stat-grid { grid-template-columns: 1fr; }
    .brand-text strong { font-size: 14px; }
}

/* 国家/地区：选定中国后出现的省、市下拉 */
.region-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 8px;
    margin-top: 8px;
}

.region-row[hidden] { display: none; }

/* 表格姓名单元格下的国家/地区小字 */
.region-line {
    display: block;
    margin-top: 2px;
    font-size: 12px;
    font-weight: normal;
    color: #7a8699;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 表格里的提交时间：窄屏换成"日期 / 时间"两行，避免日期被挤断 */
.time-part { margin-left: 6px; }

/* 状态列里的驳回原因：限宽单行省略，避免长文本把表格撑得很宽 */
.review-note {
    white-space: nowrap;
    word-break: keep-all;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 审核操作列固定在表格右侧，横向滚动时始终可见（仅宽屏启用，手机取消避免覆盖状态列） */
.table-wrap { position: relative; }
@media (min-width: 768px) {
    .data-table th.col-actions,
    .data-table td.actions {
        position: sticky;
        right: 0;
        z-index: 1;
        background: #fff;
    }
    .data-table th.col-actions { background: #f2f8fe; }
    .data-table tbody tr:hover td.actions { background: #f8fbff; }
}

@media (max-width: 760px) {
    .time-part { display: block; margin-left: 0; }
}

/* ============================================================
   证件类型菜单（新增登记页的 Tab 选择）
   ============================================================ */
.cert-tabs-block { margin-bottom: 18px; }

.cert-tabs-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
    margin-bottom: 9px;
}

.cert-tabs-label .req { color: var(--danger); margin: 0 2px 0 3px; }

.cert-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 9px;
    background: linear-gradient(180deg, #f3f9ff 0%, #eaf3fd 100%);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.cert-tab {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1px;
    min-width: 0;
    padding: 8px 14px;
    background: #e6f1fd;
    border: 1px solid #cfdff2;
    border-radius: 9px;
    font-family: inherit;
    color: var(--text);
    text-align: left;
    cursor: pointer;
    transition: background .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.cert-tab-name {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
    white-space: nowrap;
}

.cert-tab-meta {
    font-size: 12px;
    color: var(--muted);
    white-space: nowrap;
}

.cert-tab:hover:not(:disabled) {
    background: #ffffff;
    border-color: var(--accent);
    box-shadow: 0 2px 8px rgba(22, 104, 193, 0.12);
}

.cert-tab.is-active {
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 6px 16px rgba(22, 104, 193, 0.22);
}

.cert-tab.is-active .cert-tab-name { color: #fff; }
.cert-tab.is-active .cert-tab-meta { color: rgba(255, 255, 255, 0.84); }

.cert-tab:disabled,
.cert-tab.is-full {
    opacity: 0.6;
    cursor: not-allowed;
}

.cert-tab.is-full:not(.is-active) .cert-tab-meta { color: var(--danger); }

.cert-tabs-hint {
    margin: 10px 0 0;
    font-size: 12.5px;
    color: var(--muted);
    line-height: 1.7;
}

.cert-tabs-hint strong { color: var(--primary); font-weight: 600; }

@media (max-width: 560px) {
    .cert-tabs { gap: 7px; }
    .cert-tab { flex: 1 1 calc(50% - 7px); padding: 8px 10px; }
    .cert-tab-name { font-size: 13.5px; }
    .cert-tab-meta { font-size: 11.5px; }
}

/* ---------- 审核驳回弹层 ---------- */
.modal-mask {
    position: fixed; top: 0; right: 0; bottom: 0; left: 0;
    background: rgba(18, 34, 58, .45);
    display: flex; align-items: center; justify-content: center;
    padding: 20px; z-index: 1200;
}
.modal-mask[hidden] { display: none; }
.modal-box {
    width: 100%; max-width: 520px; background: #fff;
    border-radius: 10px; box-shadow: 0 14px 36px rgba(20, 40, 70, .22);
    padding: 20px 24px 18px; box-sizing: border-box;
}
.modal-head { display: flex; align-items: center; justify-content: space-between; }
.modal-head h3 { margin: 0; font-size: 16px; color: var(--text, #1f2d3d); }
.modal-close {
    border: 0; background: none; cursor: pointer; line-height: 1;
    font-size: 20px; color: var(--muted, #8a94a6); padding: 0 2px;
}
.modal-close:hover { color: #3d7ad6; }
.modal-sub { margin: 8px 0 14px; font-size: 13px; color: var(--muted, #8a94a6); line-height: 1.7; }
.modal-label { display: block; font-size: 13px; color: var(--text, #1f2d3d); margin-bottom: 6px; }
.modal-box textarea {
    width: 100%; box-sizing: border-box; resize: vertical;
    border: 1px solid #cfdae8; border-radius: 6px; padding: 9px 11px;
    font-size: 14px; font-family: inherit; color: inherit; line-height: 1.6;
}
.modal-box textarea:focus { outline: none; border-color: #3d7ad6; box-shadow: 0 0 0 3px rgba(61, 122, 214, .12); }
.modal-hint { min-height: 16px; margin: 6px 0 0; font-size: 12px; color: #e05b5b; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 8px; }
/* 子管理员：可管理证件类型勾选 */
.check-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 10px 12px;
    margin-top: 8px;
}
.check-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border: 1px solid #d9e8f6;
    border-radius: 8px;
    background: #f6fbfe;
    cursor: pointer;
}
.check-item:hover {
    border-color: #9fcdeb;
    background: #eef8fe;
}
.check-item input {
    width: 16px;
    height: 16px;
    margin: 0;
    flex: 0 0 auto;
    accent-color: #2f8ed6;
}
.check-item span {
    display: flex;
    flex-direction: column;
    line-height: 1.35;
}
.check-item strong {
    font-size: 14px;
    color: #1f2d3d;
    font-weight: 600;
}
.check-item small {
    color: #8a94a6;
    font-size: 12px;
}
@media (max-width: 640px) {
    .check-grid { grid-template-columns: 1fr; }
}

/* ---------------- 现场核验页（扫码领证 / 签到） ---------------- */
.verify-tag {
    border: 1px solid rgba(255, 255, 255, .45);
    border-radius: 999px;
    padding: 2px 12px;
    color: #fff;
    font-size: 12px;
    line-height: 18px;
}
.verify-card { padding: 26px 26px 20px; }
.verify-state { text-align: center; margin-bottom: 20px; }
.verify-icon {
    width: 56px;
    height: 56px;
    line-height: 56px;
    border-radius: 50%;
    margin: 0 auto 10px;
    font-size: 26px;
    font-weight: 700;
}
.verify-ok .verify-icon { background: #e8f7ef; color: #1d9e63; }
.verify-bad .verify-icon { background: #fdeaea; color: #d94b4b; }
.verify-wait .verify-icon { background: #fff6e6; color: #c8861a; }
.verify-state h1 { font-size: 22px; margin: 0 0 6px; }
.verify-body {
    display: flex;
    gap: 18px;
    align-items: flex-start;
    border-top: 1px solid var(--border);
    padding-top: 18px;
}
.verify-photo { width: 96px; flex: 0 0 96px; }
.verify-photo img {
    width: 96px;
    height: 128px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--border);
}
.verify-photo-tip {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: var(--muted);
    text-align: center;
}
.verify-list { flex: 1; display: grid; grid-template-columns: 88px 1fr; gap: 9px 12px; margin: 0; font-size: 14px; }
.verify-list dt { color: var(--muted); font-size: 13px; }
.verify-list dd { margin: 0; color: var(--text); font-weight: 600; word-break: break-all; }
.verify-name { font-size: 18px; }
.verify-code { font-family: Consolas, monospace; letter-spacing: 1px; color: #1768c4; }
.verify-foot {
    margin: 18px 0 0;
    padding: 10px 14px;
    background: #f5f9fe;
    border-radius: 8px;
    color: #5d6b80;
    font-size: 13px;
    line-height: 1.7;
}
.verify-copyright { text-align: center; color: var(--muted); font-size: 12px; margin-top: 18px; }
@media (max-width: 639px) {
    .verify-body { flex-direction: column; }
    .verify-photo { width: 100%; flex: none; text-align: center; }
    .verify-photo img { margin: 0 auto; }
}

/* ---------------- 后台现场核验：编号输入条 ---------------- */
.verify-search {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    flex-wrap: wrap;
    margin: 0;
}
.verify-search .form-item { flex: 1 1 260px; min-width: 0; }
.verify-search .form-actions { margin: 0; padding: 0; border-top: 0; flex: 0 0 auto; }
.verify-search input { font-size: 15px; letter-spacing: .5px; text-transform: uppercase; }
.verify-search .btn { height: 41px; padding: 0 22px; }
.verify-reason { color: var(--danger); }
@media (max-width: 639px) {
    .verify-search { flex-direction: column; align-items: stretch; }
    .verify-search .form-item { flex: none; }
    .verify-search .form-actions { display: flex; gap: 10px; }
    .verify-search .form-actions .btn { flex: 1 1 0; width: auto; }
}

/* ---------------- 扫码核验遮罩层 ---------------- */
.scan-layer {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(10, 18, 32, .78);
}
.scan-layer[hidden] { display: none; }
.scan-box {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border-radius: 14px;
    padding: 16px 16px 14px;
    box-shadow: 0 18px 50px rgba(8, 20, 40, .35);
}
.scan-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}
.scan-head strong { font-size: 15px; color: var(--text); }
.scan-close {
    border: 0;
    background: transparent;
    font-size: 22px;
    line-height: 1;
    color: var(--muted);
    cursor: pointer;
    padding: 0 4px;
}
.scan-stage {
    position: relative;
    width: 100%;
    height: 288px;
    background: #0d1524;
    border-radius: 10px;
    overflow: hidden;
}
.scan-stage video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.scan-frame {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 190px;
    height: 190px;
    margin: -95px 0 0 -95px;
    border: 2px solid rgba(255, 255, 255, .85);
    border-radius: 10px;
    box-shadow: 0 0 0 9999px rgba(8, 16, 30, .16);
}
.scan-tip {
    margin: 10px 0 0;
    min-height: 20px;
    font-size: 13px;
    line-height: 1.6;
    color: var(--muted);
}
.scan-tip-warn { color: var(--danger); }
.scan-tip-ok { color: var(--success); }
/* HTTP 访问无法开摄像头：收起取景框，只留提示与拍照按钮 */
.scan-layer.scan-fallback .scan-stage { display: none; }
.scan-actions { margin-top: 10px; }
.scan-actions .btn { width: 100%; }
.scan-hint {
    margin: 8px 0 0;
    font-size: 12px;
    line-height: 1.6;
    color: var(--muted);
}
/* ===== 报名管理 / 报名页 ===== */
.enroll-link-box {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.enroll-link {
    display: inline-block;
    max-width: 380px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: Consolas, Menlo, monospace;
    font-size: 12px;
    color: var(--primary, #1768c4);
}
.enroll-link-card {
    margin-bottom: 16px;
    padding: 14px 18px;
}
.enroll-link-card > label {
    display: block;
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 6px;
}
.enroll-link-card .hint {
    display: block;
    margin-top: 8px;
}
.enroll-hero {
    background: linear-gradient(135deg, #f4f9ff 0%, #eef6ff 55%, #ffffff 100%);
    border: 1px solid #dbe9f9;
}
.enroll-hero-body {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}
/* 有 Banner 时卡片内边距归零，图片按 3:1 铺满顶部 */
.enroll-hero.has-banner { padding: 0; overflow: hidden; }
.enroll-hero.has-banner .enroll-hero-body { padding: 18px 24px 22px; }
.enroll-banner {
    position: relative;
    width: 100%;
    padding-top: 33.3333%;
    overflow: hidden;
    background: #eef6ff;
}
.enroll-banner img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.enroll-hero-main { min-width: 0; }
.enroll-hero-main h1 {
    margin: 8px 0 10px;
    font-size: 24px;
    line-height: 1.35;
    color: #10365e;
}
.enroll-tag {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    background: #e3f0ff;
    color: #1768c4;
    font-size: 12px;
    letter-spacing: .5px;
}
.enroll-desc {
    margin: 0 0 10px;
    color: #5d6b80;
    font-size: 14px;
    line-height: 1.8;
    white-space: pre-line;
}
.enroll-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 20px;
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}
.enroll-hero-side { flex: none; }
.enroll-result {
    padding: 6px 0 0;
    color: #1f2d3d;
    font-size: 14px;
    line-height: 1.9;
}
.enroll-code-cell {
    font-family: Consolas, Menlo, monospace;
    font-size: 12px;
    letter-spacing: .4px;
}
@media (max-width: 640px) {
    .enroll-hero-body {
        flex-direction: column;
        gap: 10px;
    }
    .enroll-hero.has-banner .enroll-hero-body { padding: 14px 18px 18px; }
    .enroll-hero-main h1 { font-size: 20px; }
    .enroll-link { max-width: 190px; }
}
/* 报名记录表：列较多，窄屏只保留姓名 / 状态 / 审核三列，避免横向滚动挡住审核按钮 */
.enroll-code-cell { white-space: nowrap; }

/* hide-pc 需高于 .region-line 的 display:block，否则 PC 端会漏出仅手机可见的内容 */
.hide-pc { display: none !important; }

@media (max-width: 760px) {
    table.data-table.enroll-records-table { min-width: 0; }
    table.data-table.enroll-records-table td { white-space: nowrap; }
    table.data-table.enroll-records-table .hide-sm,
    table.data-table.enroll-records-table .col-event,
    table.data-table.enroll-records-table .col-code { display: none !important; }

    .hide-pc { display: inline !important; }
}

/* 报名记录操作列：按钮允许换行，空间不够时自动排成两行，避免把状态列挤扁 */
.enroll-records-table td.actions { white-space: normal; padding-left: 6px; padding-right: 8px; }
.enroll-records-table td.actions form { display: inline-block; margin: 0 3px 3px 0; }
.enroll-records-table td.actions form + form { margin-left: 0; }
/* 账号信息详情块（子管理员编辑页长期缺样式） */
.detail-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px 24px;
}
.detail-grid > div { display: flex; align-items: baseline; gap: 8px; }
.detail-label { color: var(--muted); font-size: 13px; white-space: nowrap; }
.detail-value { color: #1f2d3d; font-weight: 600; }
@media (max-width: 640px) {
    .detail-grid { grid-template-columns: 1fr; }
}

/* 报名记录操作列：三个按钮贴边过紧，留出右侧留白 */
.enroll-records-table td.actions { padding-right: 12px; }

/* 报名类型列表：链接列限宽，避免长 URL 撑开表格挤掉后序列 */
.enroll-admin-table .enroll-link { max-width: 170px; }

/* 报名类型列表窄屏：操作按钮换行，避免被挤出卡片 */
@media (max-width: 760px) {
    .enroll-admin-table td.actions { white-space: normal; width: 92px; }
    .enroll-admin-table td.actions .btn-sm { margin: 0 4px 4px 0; }
    .enroll-admin-table td.actions .inline-form { display: inline-block; }
    .enroll-admin-table td .text-muted { display: block; font-size: 11.5px; }
    .enroll-admin-table td .region-line { font-size: 11.5px; }
}

/* 报名类型表单：Banner 上传与预览（预览区始终 3:1） */
.banner-input-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.banner-input-row input[type="file"] { font-size: 13px; }
.banner-preview {
    position: relative;
    display: none;
    margin-top: 12px;
    width: 300px;
    height: 100px;
    max-width: 100%;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: #eef6ff;
}
.banner-preview.is-on { display: block; }
.banner-preview.is-bad { border-color: #e6a3a3; }
.banner-preview img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.banner-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 10px; }
.banner-remove { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 400; color: #b03434; }
.hint-ok { color: #1a7f52; }
.hint-bad { color: #c02b2b; }

/* 窄屏：预览宽度铺满，用父宽百分比撑出 3:1 */
@media (max-width: 640px) {
    .banner-preview { width: 100%; height: 0; padding-top: 33.3333%; }
}
/* 报名记录表：窄屏隐藏照片列，给审核按钮腾出换行空间 */
@media (max-width: 1200px) {
    table.data-table.enroll-records-table .col-photo { display: none !important; }
}

/* 报名类型列按 130px 固定并允许换行，避免长名称撑宽把操作列挤成单行按钮 */
.enroll-records-table th.col-event,
.enroll-records-table td.col-event { width: 130px; max-width: 130px; white-space: normal; word-break: break-word; }
/* 公开报名页中英文切换（清爽浅蓝胶囊，右对齐） */
.lang-bar { display: flex; justify-content: flex-end; padding: 16px 0 4px; }
.lang-switch { display: inline-flex; align-items: center; gap: 2px; background: #fff; border: 1px solid #d6e6f5; border-radius: 999px; padding: 3px; box-shadow: 0 2px 10px rgba(31, 93, 160, .08); }
.lang-btn { border: 0; background: transparent; color: #46688c; font: inherit; font-size: 15px; line-height: 1; padding: 8px 16px; border-radius: 999px; cursor: pointer; transition: background .18s, color .18s; }
.lang-btn:hover { background: #f0f7ff; }
.lang-btn.is-active { background: #1f7ae0; color: #fff; }
.lang-btn.is-active:hover { background: #1a6cc8; }
@media (max-width: 640px) {
    .lang-bar { padding: 12px 0 2px; }
    .lang-btn { padding: 7px 14px; font-size: 14px; }
}

/* 报名时间「标签 + 值」作为一个整块，避免 flex gap 把冒号和值拉开 */
.enroll-meta-item { display: inline-flex; align-items: baseline; gap: 0; }

/* 含变量的整句提供中英两份，按页面语言只显示其中一份（不加 display 值，保持元素自身块级/行内特性） */
html[lang="en"] .only-zh { display: none !important; }
html:not([lang="en"]) .only-en { display: none !important; }

/* 后台页头语言切换（比公开页小一号，跟按钮同一行垂直居中） */
.page-actions { align-items: center; }
.lang-switch-sm { padding: 2px; }
.lang-switch-sm .lang-btn { font-size: 13px; padding: 6px 12px; }
/* 门户证件登记表：手机上只剩 4 列时让操作按钮换行，避免"删除"被裁到容器外 */
@media (max-width: 760px) {
    .data-table.portal-registrant-table th { white-space: normal; }
    .data-table.portal-registrant-table td.actions { white-space: normal; padding-left: 4px; padding-right: 4px; }
    .data-table.portal-registrant-table td.actions .btn-sm { margin: 0 3px 3px 0; }
    .data-table.portal-registrant-table td.actions .inline-form { display: inline-block; }
    .data-table.portal-registrant-table th:last-child { width: 88px !important; }

    /* 后台证件记录表：手机上审核列竖排，列宽收窄 */
    .data-table.registrant-table th { white-space: normal; }
    .data-table.registrant-table th.col-actions,
    .data-table.registrant-table th:last-child { width: 88px !important; }
}

/* 英文界面：英文表头与英文证件类型名更宽，1280 视口下表格会横向溢出，
   状态徽章右缘会被粘性审核列压住。这里只在英文语言态收紧各列（中文界面保持原样）。 */
@media (min-width: 761px) {
    html[lang="en"] .data-table.registrant-table td.cert-type-cell { max-width: 100px; white-space: normal; }
    html[lang="en"] .data-table.registrant-table td.name-cell { max-width: 130px; white-space: normal; overflow-wrap: anywhere; }
    html[lang="en"] .data-table.registrant-table td.wrap { max-width: 96px; min-width: 96px; }
    html[lang="en"] .data-table.registrant-table th:nth-child(2) { width: 130px !important; }
    html[lang="en"] .data-table.registrant-table td.name-cell { min-width: 126px; }
    html[lang="en"] .data-table.registrant-table td.actions .btn-sm { padding: 4px 8px; font-size: 12px; }
}

/* 手机英文：Approve / Details 等词更长，按钮统一 72px 宽竖排，压一点字号避免顶边 */
@media (max-width: 760px) {
    html[lang="en"] .data-table.registrant-table th[data-i18n="reg.thStatus"] { width: 96px !important; }
    html[lang="en"] .data-table.registrant-table td.actions .btn-sm { padding: 3px 6px; font-size: 11.5px; }
}

/* 审核列：通过 / 驳回 / 详情 竖排成一列（PC 与手机一致），列宽收到 88px */
.data-table.registrant-table td.actions { white-space: normal; text-align: center; padding: 8px 6px; }
.data-table.registrant-table td.actions .inline-form { display: block; margin: 0 0 4px; }
.data-table.registrant-table td.actions .btn-sm {
    display: flex;
    justify-content: center;
    width: 72px;
    margin: 0 auto 4px;
    white-space: nowrap;
}
.data-table.registrant-table td.actions > *:last-child { margin-bottom: 0; }

/* 批量审核：勾选列 + 表格上方的批量操作条 */
.data-table.registrant-table td.col-check,
.data-table.registrant-table th.col-check { text-align: center; padding-left: 8px; padding-right: 8px; }
.data-table.registrant-table .row-check,
.data-table.registrant-table #checkAll { width: 17px; height: 17px; cursor: pointer; vertical-align: middle; margin: 0; }
.data-table.registrant-table .row-check:disabled { cursor: not-allowed; opacity: .35; }
.batch-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 14px;
    margin-bottom: 12px;
    background: #f4f9ff;
    border: 1px solid #dbe9f8;
    border-radius: 8px;
}
.batch-count { font-size: 13px; font-weight: 600; color: #315474; }
.batch-hint { font-size: 12px; color: #7a8699; }
.batch-bar .btn[disabled] { cursor: not-allowed; }

@media (max-width: 760px) {
    .data-table.registrant-table td.col-check,
    .data-table.registrant-table th.col-check { padding-left: 4px; padding-right: 4px; }
    .batch-bar { padding: 8px 10px; gap: 8px; }
    .batch-hint { display: none; }
}
/* ==========================================================================
   邮件群发系统 - 扩展样式（在证件系统 site.css 基础上补充，不影响原有类）
   2026-11
   ========================================================================== */

/* 页面标题别名 */
.page-title { font-size: 22px; margin: 0 0 4px; font-weight: 700; color: #16324f; }
.page-sub { color: var(--muted); font-size: 13px; margin: 0; }

/* 导航高亮 */
.app-nav a.active { background: rgba(255,255,255,0.22); color: #fff; font-weight: 600; }

/* 提示条（自定义运行提示） */
.alert-warn { background: var(--warning-bg); color: #8a5a00; border-color: #f2dca8; display: block; }
.alert-list { margin: 6px 0 0; padding-left: 18px; font-size: 13px; line-height: 1.8; }
.alert-list li { list-style: disc; }

/* 按钮：补充 primary / ghost / mini */
.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-ghost { background: #fff; color: var(--primary); border: 1px solid #cfe0f2; }
.btn-ghost:hover { background: var(--primary-light); color: var(--primary-dark); box-shadow: none; }
.btn-mini {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 4px 10px; font-size: 12.5px; line-height: 1.6;
    border-radius: 6px; border: 1px solid #d5e3f3; background: #fff;
    color: var(--primary); cursor: pointer; white-space: nowrap;
    transition: background .15s, color .15s;
}
.btn-mini:hover { background: var(--primary-light); color: var(--primary-dark); }
.btn-mini.btn-danger { color: var(--danger); border-color: #f1c7c7; background: #fff; }
.btn-mini.btn-danger:hover { background: var(--danger-bg); }
.btn-group { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* 两列布局 */
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.grid-2 > * { min-width: 0; }
.grid-form { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.col-main, .col-side { min-width: 0; }
.sticky-card { position: sticky; top: 88px; }

/* 统计数值别名 */
.stat-num { font-size: 28px; font-weight: 700; color: var(--primary); line-height: 1.25; }
.stat-grid-4 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.text-success { color: var(--success) !important; }
.text-danger { color: var(--danger) !important; }

/* 工具条 / 标签页 */
.toolbar {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; flex-wrap: wrap; margin-bottom: 16px;
    padding-bottom: 14px; border-bottom: 1px solid #edf3fa;
}
.tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.tab {
    display: inline-block; padding: 6px 12px; border-radius: 999px;
    font-size: 13px; color: #3b5471; background: #f2f8fe; border: 1px solid transparent;
    white-space: nowrap;
}
.tab:hover { background: var(--primary-light); color: var(--primary-dark); }
.tab.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.search-form { display: flex; gap: 8px; align-items: center; margin: 0; }
.search-input { min-width: 190px; padding: 8px 11px !important; }
.filter-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; width: 100%; }

/* 状态徽标（任务/明细） */
.badge { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; line-height: 1.5; }
.badge-draft { color: #5a6b80; background: #eef3f9; }
.badge-queued { color: #a9630f; background: var(--warning-bg); }
.badge-sending { color: var(--primary); background: var(--primary-light); }
.badge-paused { color: #7b4bb5; background: #f1e9fd; }
.badge-completed { color: var(--success); background: var(--success-bg); }
.badge-cancelled { color: var(--muted); background: #eef3f9; text-decoration: line-through; }
.badge-pending { color: #a9630f; background: var(--warning-bg); }
.badge-success { color: var(--success); background: var(--success-bg); }
.badge-failed { color: var(--danger); background: var(--danger-bg); }
.badge-skipped { color: var(--muted); background: #eef3f9; }
.badge-muted { color: var(--muted); background: #eef3f9; }

/* 文本辅助 */
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.strong { font-weight: 600; color: #1c3a5c; }
.strong-link { font-weight: 600; color: var(--primary); }
.strong-link:hover { text-decoration: underline; }
.ellipsis { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-link { font-size: 13px; color: var(--primary); }
.card-title { font-size: 16px; margin: 0; font-weight: 700; color: #1c3a5c; }
.card-subtitle { font-size: 14px; margin: 0 0 10px; color: #1c3a5c; }
.divider { height: 1px; background: #edf3fa; margin: 18px 0; }

/* 表格列宽辅助 */
.w-70 { width: 70px; } .w-80 { width: 80px; } .w-90 { width: 90px; }
.w-100 { width: 100px; } .w-110 { width: 110px; } .w-120 { width: 120px; }
.w-130 { width: 130px; } .w-140 { width: 140px; } .w-150 { width: 150px; }
.w-160 { width: 160px; } .w-170 { width: 170px; } .w-180 { width: 180px; }
.w-220 { width: 220px; } .w-260 { width: 260px; }

/* 表单补充 */
.form-label { font-size: 13px; color: #3b5471; margin-bottom: 6px; font-weight: 600; }
.form-label em { color: var(--danger); font-style: normal; margin-left: 2px; }
.form-input, .form-select, .form-textarea, .form-file { width: 100%; }
.form-file { padding: 8px 0; font-size: 13px; }
.form-textarea { min-height: 84px; resize: vertical; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.form-row > * { min-width: 0; }
.form-tip { font-size: 12px; color: var(--muted); margin-top: 6px; line-height: 1.7; }
.form-tip code { background: #f2f8fe; color: var(--primary-dark); padding: 1px 5px; border-radius: 4px; font-size: 12px; }
.form-card { max-width: 720px; }
.form-inline-block { margin-bottom: 18px; }
.checkbox, .radio { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; color: #3b5471; margin: 4px 16px 4px 0; cursor: pointer; }
.checkbox input, .radio input { width: auto !important; margin: 0; }
.check-grid { display: flex; flex-wrap: wrap; gap: 4px 8px; padding: 8px 0; }
textarea.code { font-family: Consolas, "Courier New", monospace; font-size: 13px; line-height: 1.7; }
.code-block {
    background: #f7fbff; border: 1px solid var(--border); border-radius: 8px;
    padding: 12px 14px; font-family: Consolas, "Courier New", monospace;
    font-size: 12.5px; color: #315474; overflow-x: auto; white-space: pre;
}

/* 详情页 */
.detail-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.detail-head .badge { font-size: 13px; padding: 4px 12px; }
.progress-meta { display: flex; gap: 18px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); margin: 8px 0 16px; }
.progress-lg { height: 14px; margin-top: 4px; }
.attach-list { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding-top: 12px; border-top: 1px dashed #e3edf7; }
.chip { display: inline-block; padding: 4px 10px; border-radius: 6px; background: #f2f8fe; border: 1px solid #dbe8f7; font-size: 12.5px; color: #315474; }
.kv { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 8px 12px; font-size: 13.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; color: #315474; }

/* 空状态 */
.empty { text-align: center; padding: 36px 12px; color: var(--muted); }
.empty p { margin: 0 0 14px; font-size: 13.5px; }
.empty-card { text-align: center; padding: 56px 24px; }
.empty-card h2 { margin: 0 0 8px; color: #16324f; }

/* 系统状态 */
.status-row { display: flex; align-items: center; gap: 10px; font-size: 13.5px; padding: 9px 0; border-bottom: 1px dashed #eef4fb; }
.status-row:last-child { border-bottom: none; }
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); flex: 0 0 auto; }
.status-dot.ok { background: var(--success); box-shadow: 0 0 0 3px rgba(18,148,85,0.14); }
.status-dot.bad { background: var(--danger); box-shadow: 0 0 0 3px rgba(207,68,68,0.14); }

/* 登录 / 退订等独立页面 */
.auth-body {
    min-height: 100vh; margin: 0; padding: 28px 16px 60px;
    background: linear-gradient(140deg, #eaf3fd 0%, #f6faff 55%, #e9f2fc 100%);
    display: flex; align-items: center; justify-content: center;
    font-family: "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}
.auth-wrap { width: 100%; max-width: 420px; padding-top: 0; }
.auth-card {
    background: #fff; border-radius: 14px; padding: 30px 32px 26px;
    box-shadow: 0 14px 38px rgba(23, 78, 140, 0.14); border: 1px solid #e3eefb;
}
.auth-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; color: #145ba9; font-weight: 700; font-size: 16px; }
.auth-brand img { width: 34px; height: 34px; border-radius: 8px; background: #fff; }
.auth-title { font-size: 20px; margin: 0 0 6px; color: #16324f; }
.auth-sub { font-size: 13px; color: var(--muted); line-height: 1.8; margin: 0 0 20px; word-break: break-all; }
.auth-hint { font-size: 12px; color: var(--muted); margin: 16px 0 0; line-height: 1.7; }
.auth-footer { text-align: center; font-size: 12px; color: #7c93ab; margin-top: 18px; }
.form-item-inline { margin-top: 2px; }

/* 窄屏适配 */
@media (max-width: 900px) {
    .grid-2, .grid-form { grid-template-columns: minmax(0, 1fr); }
    .stat-grid, .stat-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sticky-card { position: static; }
    .header-inner { gap: 12px; }
    .app-nav { order: 3; flex-basis: 100%; padding-bottom: 4px; }
    .search-form { width: 100%; }
    .search-input { flex: 1 1 auto; min-width: 0; }
}
@media (max-width: 560px) {
    .stat-grid, .stat-grid-4 { grid-template-columns: minmax(0, 1fr); }
    .page-head { align-items: flex-start; }
    .auth-card { padding: 24px 20px; }
    .kv { grid-template-columns: 80px minmax(0, 1fr); }
}

/* 工作台 6 个统计卡：3 列 2 行更均衡 */
.stat-grid-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) { .stat-grid-6 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .stat-grid-6 { grid-template-columns: minmax(0, 1fr); } }

/* 表单纵向间距（本系统表单多为单列，需要显式下间距） */
.form .form-item, .card .form-item { margin-bottom: 14px; }
.form .form-item:last-child { margin-bottom: 0; }

/* 窄版单列表单（如修改密码） */
.form-narrow { width: 100%; max-width: 560px; }
.link-btn { text-decoration: none; display: inline-block; }
