/* =========================================================
   小店区消防救援局报表管理系统 - 样式表
   ========================================================= */
:root {
    --brand: #b3261e;
    --brand-dark: #8e1d17;
    --brand-soft: #fdf0ef;
    --navy: #101a2c;
    --navy-2: #16233a;
    --navy-3: #1d2c46;
    --bg: #f3f5f9;
    --card: #ffffff;
    --text: #1f2a3d;
    --text-2: #47536b;
    --muted: #7a8598;
    --border: #e3e8f0;
    --border-strong: #d3dae6;
    --blue: #1d4ed8;
    --green: #157347;
    --green-soft: #e9f7ef;
    --amber: #a16207;
    --amber-soft: #fef7e0;
    --red-soft: #fdecec;
    --sidebar-w: 236px;
    --radius: 10px;
    --shadow: 0 1px 2px rgba(16, 26, 44, .04), 0 6px 24px rgba(16, 26, 44, .05);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    color: var(--text);
    background: var(--bg);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--blue); text-decoration: none; }
a:hover { color: #163fb0; }
h1, h2, h3, h4, h5 { margin: 0; font-weight: 600; }
p { margin: 0 0 10px; }
ul, ol { margin: 0; padding-left: 20px; }
img { max-width: 100%; }

.icon { vertical-align: -2px; flex: 0 0 auto; }

/* ---------------- 布局 ---------------- */
.app-shell { min-height: 100vh; }

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--sidebar-w);
    background: var(--navy);
    color: #c9d3e3;
    display: flex;
    flex-direction: column;
    z-index: 40;
    transition: transform .2s ease;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 18px 18px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, .07);
}
.brand-mark {
    width: 38px; height: 38px;
    border-radius: 10px;
    background: var(--brand);
    display: flex; align-items: center; justify-content: center;
    flex: 0 0 auto;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text strong { color: #fff; font-size: 16px; letter-spacing: .5px; }
.brand-text span { color: #8e9bb2; font-size: 11.5px; letter-spacing: 1.5px; }

.nav { flex: 1; overflow-y: auto; padding: 12px 10px 20px; }
.nav::-webkit-scrollbar { width: 5px; }
.nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); border-radius: 4px; }

.nav-group-title {
    padding: 14px 12px 6px;
    color: #66748c;
    font-size: 11px;
    letter-spacing: 1.5px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 12px;
    margin: 2px 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #b9c4d6;
    font-size: 13.5px;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    position: relative;
    transition: background .15s, color .15s;
}
.nav-item:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav-item.active {
    background: rgba(179, 38, 30, .16);
    color: #fff;
}
.nav-item.active::before {
    content: "";
    position: absolute;
    left: 0; top: 8px; bottom: 8px;
    width: 3px;
    border-radius: 3px;
    background: var(--brand);
}
.nav-icon { display: flex; opacity: .9; }
.nav-text { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-arrow { display: flex; opacity: .55; transition: transform .18s; }
.nav-group.open .nav-arrow { transform: rotate(90deg); }
.nav-children { display: none; padding-left: 8px; }
.nav-group.open .nav-children { display: block; }
.nav-child { padding-left: 20px; font-size: 13px; color: #a7b4c9; }
.nav-dot {
    width: 5px; height: 5px; border-radius: 50%;
    background: #5b6a83;
    flex: 0 0 auto;
}
.nav-child.active .nav-dot { background: var(--brand); }

.sidebar-foot {
    padding: 14px 18px 16px;
    border-top: 1px solid rgba(255, 255, 255, .07);
    color: #6d7b93;
    font-size: 11.5px;
}
.sidebar-foot-line { line-height: 1.7; }

.main {
    margin-left: var(--sidebar-w);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 62px;
    padding: 8px 22px;
    background: #fff;
    border-bottom: 1px solid var(--border);
}
.sidebar-toggle { display: none; }
.page-head { flex: 1; min-width: 0; }
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.4;
}
.breadcrumb a { color: var(--muted); display: inline-flex; align-items: center; gap: 3px; }
.breadcrumb a:hover { color: var(--brand); }
.breadcrumb .sep { color: #c3cad6; }
.page-title { font-size: 17px; line-height: 1.5; margin-top: 1px; }

.topbar-right { display: flex; align-items: center; gap: 12px; }
.topbar-link { display: inline-flex; align-items: center; gap: 5px; }

.user-menu { position: relative; }
.user-trigger {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 4px 6px 4px 4px;
    border: 1px solid transparent;
    border-radius: 9px;
    background: transparent;
    cursor: pointer;
    font-family: inherit;
}
.user-trigger:hover { background: #f5f7fa; border-color: var(--border); }
.avatar {
    width: 34px; height: 34px;
    border-radius: 9px;
    background: var(--brand-soft);
    color: var(--brand);
    display: flex; align-items: center; justify-content: center;
    font-weight: 600;
    font-size: 15px;
}
.user-info { display: flex; flex-direction: column; line-height: 1.25; text-align: left; }
.user-info strong { font-size: 13px; color: var(--text); font-weight: 600; }
.user-info small { font-size: 11px; color: var(--muted); }

.dropdown-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    width: 208px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 12px 36px rgba(16, 26, 44, .14);
    padding: 6px;
    display: none;
    z-index: 60;
}
[data-dropdown].open .dropdown-menu { display: block; }
.dropdown-header { padding: 9px 10px 8px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.dropdown-header strong { display: block; font-size: 13px; }
.dropdown-header small { color: var(--muted); font-size: 11.5px; }
.dropdown-menu a, .dropdown-menu button {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px 10px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--text-2);
    font-size: 13px;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
}
.dropdown-menu a:hover, .dropdown-menu button:hover { background: #f5f7fa; color: var(--brand); }
.dropdown-divider { height: 1px; background: var(--border); margin: 5px 4px; }
.logout-form { margin: 0; }

.content {
    flex: 1;
    padding: 20px 22px 26px;
    max-width: 100%;
}
.page-subtitle { color: var(--muted); margin: -10px 0 16px; font-size: 13px; }

.app-footer {
    display: flex;
    gap: 6px;
    justify-content: center;
    padding: 14px;
    color: #9aa4b5;
    font-size: 11.5px;
}
.app-footer .dot { opacity: .5; }

/* ---------------- 卡片 ---------------- */
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 18px;
}
.card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
}
.card-header h2, .card-header h3 { font-size: 15px; display: flex; align-items: center; gap: 7px; }
.card-header .desc { color: var(--muted); font-size: 12.5px; }
.card-header .spacer { flex: 1; }
.card-body { padding: 18px; }
.card-body.no-pad { padding: 0; }
.card-footer { padding: 12px 18px; border-top: 1px solid var(--border); background: #fbfcfe; border-radius: 0 0 var(--radius) var(--radius); }

/* ---------------- 栅格 ---------------- */
.row { display: flex; flex-wrap: wrap; gap: 18px; }
.row > [class*="col-"] { flex: 1 1 0; min-width: 0; }
.col-2 { flex: 0 0 calc(50% - 9px); }
.col-3 { flex: 0 0 calc(33.333% - 12px); }
.col-4 { flex: 0 0 calc(25% - 13.5px); }
.col-6 { flex: 0 0 100%; }
.col-auto { flex: 0 0 auto; }

/* ---------------- 统计卡 ---------------- */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 18px; }
.stat-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 18px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: flex-start;
    gap: 14px;
}
.stat-icon {
    width: 42px; height: 42px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    background: var(--brand-soft);
    color: var(--brand);
    flex: 0 0 auto;
}
.stat-icon.blue { background: #eef3ff; color: var(--blue); }
.stat-icon.green { background: var(--green-soft); color: var(--green); }
.stat-icon.amber { background: var(--amber-soft); color: var(--amber); }
.stat-meta { min-width: 0; }
.stat-value { font-size: 25px; font-weight: 600; line-height: 1.2; letter-spacing: .3px; }
.stat-label { color: var(--muted); font-size: 12.5px; margin-top: 2px; white-space: nowrap; }
.stat-extra { color: var(--muted); font-size: 11.5px; margin-top: 4px; }

/* ---------------- 按钮 ---------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 36px;
    padding: 0 14px;
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: 13px;
    font-family: inherit;
    line-height: 1;
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s, border-color .15s, color .15s;
    background: #fff;
    color: var(--text-2);
    border-color: var(--border-strong);
}
.btn:hover { color: var(--text); border-color: #b9c3d4; background: #fbfcfe; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.btn-navy { background: var(--navy-2); border-color: var(--navy-2); color: #fff; }
.btn-navy:hover { background: var(--navy); color: #fff; }
.btn-success { background: var(--green); border-color: var(--green); color: #fff; }
.btn-success:hover { background: #12603b; color: #fff; }
.btn-danger { background: #fff; border-color: #e7b4b0; color: #a72a23; }
.btn-danger:hover { background: var(--red-soft); color: #8e1d17; }
.btn-light { background: #f5f7fa; border-color: var(--border); color: var(--text-2); }
.btn-light:hover { background: #eef2f7; }
.btn-sm { height: 30px; padding: 0 10px; font-size: 12.5px; border-radius: 7px; }
.btn-xs { height: 26px; padding: 0 8px; font-size: 12px; border-radius: 6px; }
.btn-lg { height: 42px; padding: 0 20px; font-size: 14px; border-radius: 9px; }
.btn-block { width: 100%; }
.btn[disabled], .btn.disabled { opacity: .55; cursor: not-allowed; }

.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px; height: 32px;
    border: 1px solid transparent;
    border-radius: 7px;
    background: transparent;
    color: var(--text-2);
    cursor: pointer;
}
.icon-btn:hover { background: #f1f4f9; color: var(--brand); }

/* ---------------- 表单 ---------------- */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; }
.form-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grid.cols-1 { grid-template-columns: 1fr; }
.form-group { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.form-group.full { grid-column: 1 / -1; }
.form-label { font-size: 12.5px; color: var(--text-2); font-weight: 500; }
.form-label .req { color: var(--brand); margin-left: 2px; }
.form-control {
    width: 100%;
    min-height: 36px;
    padding: 7px 11px;
    border: 1px solid var(--border-strong);
    border-radius: 8px;
    background: #fff;
    color: var(--text);
    font-size: 13px;
    font-family: inherit;
    transition: border-color .15s, box-shadow .15s;
}
.form-control:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(179, 38, 30, .08);
}
textarea.form-control { min-height: 80px; resize: vertical; line-height: 1.6; }
select.form-control { padding-right: 28px; appearance: none; background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237a8598' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }
.form-help { color: var(--muted); font-size: 11.5px; line-height: 1.5; }
.form-error { color: #a72a23; font-size: 12px; }
.check-list { display: flex; flex-wrap: wrap; gap: 10px 18px; }
.check-item { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; }
.check-item input { width: 15px; height: 15px; accent-color: var(--brand); }
.form-actions { display: flex; gap: 10px; align-items: center; padding-top: 4px; }

/* 搜索过滤条 */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 10px 14px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
    background: #fbfcfe;
}
.filter-item { display: flex; flex-direction: column; gap: 5px; min-width: 140px; }
.filter-item .form-label { font-size: 12px; }
.filter-item .form-control { min-height: 34px; font-size: 12.5px; }
.filter-actions { display: flex; gap: 8px; padding-bottom: 1px; }

/* ---------------- 表格 ---------------- */
.table-wrap { overflow: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th, .table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: middle;
    white-space: nowrap;
}
.table th {
    background: #f7f9fc;
    color: #5c6779;
    font-weight: 500;
    font-size: 12px;
    border-bottom: 1px solid var(--border-strong);
}
.table th .icon { color: #9aa4b5; margin-right: 3px; }
.table tbody tr:hover { background: #fafcff; }
.table tbody tr:last-child td { border-bottom: 0; }
.table .cell-wrap { white-space: normal; min-width: 180px; }
.table .cell-num { text-align: right; font-variant-numeric: tabular-nums; }
.table .cell-check { width: 38px; text-align: center; }
.table .cell-check input { width: 15px; height: 15px; accent-color: var(--brand); }
.table .actions { display: flex; gap: 4px; }
.table .muted { color: var(--muted); }
.table-empty { padding: 46px 20px; text-align: center; color: var(--muted); }
.table-empty .icon { color: #c3cbd9; margin-bottom: 8px; }

.pagination { display: flex; align-items: center; gap: 5px; padding: 14px 18px; flex-wrap: wrap; }
.page-info { color: var(--muted); font-size: 12.5px; margin-right: auto; }
.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px; height: 30px;
    padding: 0 9px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: #fff;
    color: var(--text-2);
    font-size: 12.5px;
}
.page-btn:hover { border-color: #c3cbd9; color: var(--brand); }
.page-btn.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.page-btn.disabled { opacity: .45; }
.page-ellipsis { color: var(--muted); padding: 0 2px; }

/* ---------------- 标签 / 徽章 ---------------- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 22px;
    padding: 0 8px;
    border-radius: 999px;
    font-size: 11.5px;
    line-height: 1;
    white-space: nowrap;
}
.badge-success { background: var(--green-soft); color: var(--green); }
.badge-warning { background: var(--amber-soft); color: var(--amber); }
.badge-danger { background: var(--red-soft); color: #a72a23; }
.badge-gray { background: #eef2f7; color: #5c6779; }
.badge-blue { background: #eef3ff; color: var(--blue); }
.badge-brand { background: var(--brand-soft); color: var(--brand); }

.chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    border-radius: 6px;
    background: #f2f5f9;
    color: var(--text-2);
    font-size: 11.5px;
    white-space: nowrap;
}
.chip.brand { background: var(--brand-soft); color: var(--brand); }

/* ---------------- 提示 ---------------- */
.alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 11px 14px;
    margin-bottom: 16px;
    border-radius: 9px;
    font-size: 13px;
    line-height: 1.6;
    border: 1px solid transparent;
}
.alert-text { flex: 1; }
.alert-success { background: var(--green-soft); border-color: #c6e9d5; color: #14603c; }
.alert-danger { background: var(--red-soft); border-color: #f3cfcc; color: #95251f; }
.alert-warning { background: var(--amber-soft); border-color: #f2e2ae; color: #8a5a06; }
.alert-info { background: #eef3ff; border-color: #d4e0fb; color: #1a3f9e; }
.alert-close { margin-left: auto; border: 0; background: transparent; font-size: 18px; line-height: 1; color: inherit; opacity: .6; cursor: pointer; }

/* ---------------- 标签页 ---------------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); padding: 0 18px; background: #fff; flex-wrap: wrap; }
.tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 12px 12px 10px;
    color: var(--muted);
    font-size: 13px;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--brand); border-bottom-color: var(--brand); font-weight: 500; }
.tab .count { background: #eef2f7; color: var(--text-2); font-size: 11px; padding: 1px 6px; border-radius: 999px; }

/* ---------------- 空状态 ---------------- */
.empty-state { text-align: center; padding: 56px 20px; color: var(--muted); }
.empty-state .empty-code { font-size: 54px; font-weight: 700; color: #dbe1ea; line-height: 1; margin-bottom: 10px; }
.empty-state h2 { font-size: 17px; color: var(--text); margin-bottom: 6px; }
.empty-state p { margin-bottom: 18px; }

/* ---------------- 时间线 ---------------- */
.timeline { position: relative; padding-left: 18px; }
.timeline::before { content: ""; position: absolute; left: 4px; top: 6px; bottom: 6px; width: 1px; background: var(--border); }
.timeline-item { position: relative; padding: 0 0 16px 12px; }
.timeline-item::before {
    content: ""; position: absolute; left: -18px; top: 5px;
    width: 9px; height: 9px; border-radius: 50%;
    background: #fff; border: 2px solid #c3cbd9;
}
.timeline-item.done::before { border-color: var(--green); background: var(--green); }
.timeline-item.current::before { border-color: var(--brand); background: var(--brand); }
.timeline-title { font-size: 13px; font-weight: 500; }
.timeline-meta { color: var(--muted); font-size: 11.5px; }

/* ---------------- 弹窗（纯 CSS + JS） ---------------- */
.modal-mask {
    position: fixed; inset: 0; z-index: 100;
    background: rgba(16, 26, 44, .45);
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding: 60px 20px;
    overflow: auto;
}
.modal-mask.open { display: flex; }
.modal {
    width: 100%;
    max-width: 520px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 24px 70px rgba(16, 26, 44, .28);
    overflow: hidden;
}
.modal.modal-lg { max-width: 760px; }
.modal-header { display: flex; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.modal-header h3 { font-size: 15px; flex: 1; }
.modal-body { padding: 20px; }
.modal-footer { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--border); background: #fbfcfe; }

/* ---------------- 登录页 ---------------- */
.login-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    background: #fff;
}
.login-visual {
    position: relative;
    background: var(--navy);
    color: #fff;
    padding: 54px 58px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
}
.login-visual::before,
.login-visual::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .07);
}
.login-visual::before { width: 420px; height: 420px; right: -140px; top: -110px; }
.login-visual::after { width: 620px; height: 620px; right: -250px; bottom: -330px; border-color: rgba(179, 38, 30, .22); }
.login-brand { display: flex; align-items: center; gap: 12px; position: relative; z-index: 1; }
.login-brand-mark {
    width: 46px; height: 46px; border-radius: 12px;
    background: var(--brand);
    display: flex; align-items: center; justify-content: center;
}
.login-brand-text strong { display: block; font-size: 19px; letter-spacing: 1px; }
.login-brand-text span { color: #8e9bb2; font-size: 12.5px; letter-spacing: 3px; }
.login-copy { position: relative; z-index: 1; max-width: 460px; }
.login-copy h1 { font-size: 36px; line-height: 1.4; letter-spacing: 1px; font-weight: 600; }
.login-copy h1 em { font-style: normal; color: #f2b8b2; }
.login-copy p { color: #9aa7bc; font-size: 14px; margin-top: 18px; line-height: 2; }
.login-points { display: flex; gap: 26px; margin-top: 30px; }
.login-point strong { display: block; font-size: 22px; font-weight: 600; }
.login-point span { color: #8e9bb2; font-size: 12px; }
.login-meta { position: relative; z-index: 1; color: #6d7b93; font-size: 12px; }
.login-form-wrap { display: flex; align-items: center; justify-content: center; padding: 40px; }
.login-card { width: 100%; max-width: 372px; }
.login-card h2 { font-size: 24px; margin-bottom: 6px; }
.login-card .sub { color: var(--muted); font-size: 13px; margin-bottom: 26px; }
.login-card .form-group { margin-bottom: 16px; }
.login-card .form-control { height: 44px; font-size: 14px; border-radius: 9px; padding-left: 40px; }
.input-wrap { position: relative; }
.input-wrap .input-icon { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: #9aa4b5; display: flex; }
.captcha-row { display: flex; gap: 10px; }
.captcha-row .form-control { flex: 1; padding-left: 40px; }
.captcha-box {
    flex: 0 0 108px;
    height: 44px;
    display: flex; align-items: center; justify-content: center;
    background: #f2f5f9;
    border: 1px dashed var(--border-strong);
    border-radius: 9px;
    font-size: 17px;
    font-weight: 600;
    letter-spacing: 2px;
    color: var(--text-2);
    user-select: none;
    cursor: pointer;
}
.login-submit { width: 100%; height: 44px; margin-top: 8px; font-size: 14.5px; border-radius: 9px; }
.login-note { margin-top: 22px; color: var(--muted); font-size: 12px; text-align: center; }
.login-error { margin-bottom: 16px; }

/* ---------------- 报表编辑器 ---------------- */
.report-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    background: #fbfcfe;
}
.report-toolbar .spacer { flex: 1; }
.report-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; padding: 12px 16px; border-bottom: 1px solid var(--border); font-size: 12.5px; color: var(--text-2); }
.report-meta b { color: var(--text); font-weight: 500; }

.report-grid-wrap {
    overflow: auto;
    max-height: calc(100vh - 300px);
    position: relative;
}
.report-grid { border-collapse: separate; border-spacing: 0; font-size: 12.5px; min-width: 100%; }
.report-grid th {
    position: sticky;
    top: 0;
    z-index: 3;
    background: #f7f9fc;
    color: #5c6779;
    font-weight: 500;
    font-size: 11.5px;
    padding: 8px 8px;
    border-bottom: 1px solid var(--border-strong);
    border-right: 1px solid #eef1f6;
    white-space: nowrap;
    vertical-align: bottom;
}
.report-grid th .source-tag { display: block; font-size: 10px; color: #9aa4b5; font-weight: 400; margin-top: 2px; }
.report-grid th .source-tag.base { color: #2b7a4b; }
.report-grid td {
    padding: 4px 6px;
    border-bottom: 1px solid #eef1f6;
    border-right: 1px solid #eef1f6;
    vertical-align: middle;
    background: #fff;
    white-space: nowrap;
}
.report-grid tbody tr:hover td { background: #fafcff; }
.report-grid .col-index { position: sticky; left: 0; z-index: 2; text-align: center; color: var(--muted); background: #fbfcfe; width: 46px; min-width: 46px; }
.report-grid .col-label { position: sticky; left: 46px; z-index: 2; background: #fbfcfe; min-width: 180px; max-width: 240px; border-right: 1px solid var(--border-strong); }
.report-grid th.col-index, .report-grid th.col-label { z-index: 4; background: #f2f5f9; }
.report-grid .col-label .row-title { font-size: 12.5px; color: var(--text); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 210px; }
.report-grid .col-label .row-sub { font-size: 10.5px; color: var(--muted); }
.report-grid .cell-input {
    width: 100%;
    min-width: 120px;
    border: 1px solid transparent;
    border-radius: 5px;
    background: transparent;
    padding: 5px 6px;
    font-size: 12.5px;
    font-family: inherit;
    color: var(--text);
}
.report-grid .cell-input:hover { border-color: var(--border); background: #fff; }
.report-grid .cell-input:focus { outline: none; border-color: var(--brand); background: #fff; box-shadow: 0 0 0 2px rgba(179,38,30,.08); }
.report-grid .cell-readonly {
    padding: 5px 6px;
    color: #2b3445;
    min-width: 120px;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 260px;
}
.report-grid .cell-readonly.empty { color: #b9c0cc; }
.report-grid .cell-base { background: #f6fbf7; }
.report-grid .cell-base.editable { background: #fff; }
.report-grid .cell-required { background: #fffdf5; }
.report-grid td.cell-error { background: var(--red-soft); }
.report-grid .row-del { color: #a72a23; border: 0; background: transparent; cursor: pointer; padding: 2px; }

.report-legend { display: flex; gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: 11.5px; padding: 10px 16px; border-top: 1px solid var(--border); }
.report-legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend-dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.legend-dot.base { background: #eaf6ee; border: 1px solid #bfe3cc; }
.legend-dot.manual { background: #fff; border: 1px solid var(--border-strong); }
.legend-dot.req { background: #fffbea; border: 1px solid #efdfa6; }

/* 只读报表视图 */
.report-view-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.report-view-table th, .report-view-table td { border: 1px solid var(--border); padding: 8px 10px; text-align: left; vertical-align: top; }
.report-view-table th { background: #f7f9fc; color: #5c6779; font-weight: 500; white-space: nowrap; }
.report-view-table td { white-space: pre-wrap; min-width: 100px; }

/* 字段设计器 */
.designer-layout { display: grid; grid-template-columns: 1fr 380px; gap: 18px; align-items: start; }
.designer-side { position: sticky; top: 78px; }
.field-order { display: inline-flex; flex-direction: column; gap: 2px; }
.field-order button { border: 0; background: transparent; color: #9aa4b5; cursor: pointer; padding: 0; display: flex; }
.field-order button:hover { color: var(--brand); }

/* 文件列表 */
.file-list { display: flex; flex-direction: column; gap: 8px; }
.file-item { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 1px solid var(--border); border-radius: 8px; background: #fff; }
.file-item .file-icon { width: 32px; height: 32px; border-radius: 7px; background: #eef3ff; color: var(--blue); display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.file-item .file-meta { flex: 1; min-width: 0; }
.file-item .file-name { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-item .file-size { color: var(--muted); font-size: 11px; }
.file-thumb { width: 46px; height: 46px; object-fit: cover; border-radius: 6px; border: 1px solid var(--border); }

/* 图表（纯 CSS 条形图） */
.bar-chart { display: flex; flex-direction: column; gap: 12px; }
.bar-row { display: flex; align-items: center; gap: 10px; font-size: 12.5px; }
.bar-label { flex: 0 0 96px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-track { flex: 1; height: 18px; background: #f1f4f9; border-radius: 5px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--brand); border-radius: 5px; min-width: 2px; }
.bar-fill.blue { background: #3b6fd4; }
.bar-fill.green { background: #2f8a5b; }
.bar-fill.amber { background: #c58a12; }
.bar-value { flex: 0 0 54px; text-align: right; color: var(--text); font-variant-numeric: tabular-nums; }

/* 快捷入口 */
.shortcuts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.shortcut {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: #fff;
    color: var(--text-2);
    transition: border-color .15s, box-shadow .15s;
}
.shortcut:hover { border-color: #d9b6b3; box-shadow: 0 4px 16px rgba(179,38,30,.07); color: var(--brand); }
.shortcut .sc-icon { width: 34px; height: 34px; border-radius: 8px; background: var(--brand-soft); color: var(--brand); display: flex; align-items: center; justify-content: center; }
.shortcut strong { font-size: 13px; font-weight: 500; }
.shortcut span { font-size: 11.5px; color: var(--muted); }

/* 详情列表 */
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; border: 1px solid var(--border); border-radius: 9px; overflow: hidden; }
.detail-item { display: flex; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--border); font-size: 13px; }
.detail-item:nth-child(odd) { border-right: 1px solid var(--border); }
.detail-item .dt { flex: 0 0 130px; color: var(--muted); font-size: 12.5px; }
.detail-item .dd { flex: 1; min-width: 0; color: var(--text); word-break: break-all; }
.detail-item.full { grid-column: 1 / -1; border-right: 0; }

/* 打印 */
@media print {
    .sidebar, .topbar, .app-footer, .report-toolbar, .filter-bar, .no-print, .btn { display: none !important; }
    .main { margin-left: 0; }
    .content { padding: 0; }
    .card { border: 0; box-shadow: none; }
    .report-view-table th, .report-view-table td { border-color: #999; }
    body { background: #fff; }
}

/* ---------------- 响应式 ---------------- */
@media (max-width: 1200px) {
    .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .designer-layout { grid-template-columns: 1fr; }
    .designer-side { position: static; }
    .shortcuts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
    .sidebar { transform: translateX(-100%); }
    body.sidebar-open .sidebar { transform: translateX(0); }
    .main { margin-left: 0; }
    .sidebar-toggle { display: inline-flex; }
    .form-grid, .form-grid.cols-3 { grid-template-columns: 1fr; }
    .row { display: block; }
    .col-2, .col-3, .col-4, .col-6 { width: 100%; }
    .login-page { grid-template-columns: 1fr; }
    .login-visual { display: none; }
    .login-form-wrap { min-height: 100vh; padding: 24px; }
    .user-info { display: none; }
    .topbar { padding: 8px 14px; }
    .content { padding: 16px 14px; }
    .stats { grid-template-columns: 1fr; }
    .detail-grid { grid-template-columns: 1fr; }
    .detail-item:nth-child(odd) { border-right: 0; }
    .shortcuts { grid-template-columns: 1fr; }
}

/* ---------------- 补充组件 ---------------- */
.muted { color: var(--muted); }
code { background: #f2f5f9; padding: 1px 5px; border-radius: 4px; font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; }

.group-box {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 18px;
    overflow: hidden;
}
.group-box > summary {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    cursor: pointer;
    list-style: none;
    user-select: none;
}
.group-box > summary::-webkit-details-marker { display: none; }
.group-box > summary:hover { background: #fbfcfe; }
.group-box .group-title { display: inline-flex; align-items: center; gap: 7px; font-size: 15px; font-weight: 600; }
.group-box .group-count { color: var(--muted); font-size: 12px; }
.group-box .group-arrow { margin-left: auto; color: #9aa4b5; transition: transform .18s; }
.group-box[open] .group-arrow { transform: rotate(90deg); }
.group-box > .card-body { border-top: 1px solid var(--border); }

.perm-module { border: 1px solid var(--border); border-radius: 9px; margin-bottom: 12px; overflow: hidden; }
.perm-module-head { display: flex; align-items: center; gap: 10px; padding: 11px 14px; background: #f7f9fc; border-bottom: 1px solid var(--border); }
.perm-module-head strong { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; }
.perm-children { padding: 8px 14px 12px; }
.perm-row { padding: 9px 0; border-bottom: 1px dashed #eef1f6; }
.perm-row:last-child { border-bottom: 0; }
.perm-menu { font-size: 13px; }
.perm-actions { display: flex; flex-wrap: wrap; gap: 8px 16px; padding: 7px 0 0 24px; }
.perm-action { font-size: 12.5px; color: var(--text-2); background: #fafbfd; border: 1px solid #eef1f6; border-radius: 6px; padding: 3px 9px; }
.perm-action input { width: 14px; height: 14px; accent-color: var(--brand); }

@media print {
    .report-grid-wrap { max-height: none; overflow: visible; }
    .report-view-table { font-size: 11px; }
}

/* ---------------- 前台/后台登录入口区分 ---------------- */
.login-kicker {
    display: inline-block;
    font-size: 12px;
    letter-spacing: 3px;
    color: #f4c9c5;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 20px;
    padding: 3px 14px;
    margin-bottom: 16px;
}
.login-entry-tag {
    display: inline-block;
    font-size: 11.5px;
    padding: 2px 10px;
    border-radius: 20px;
    margin-bottom: 10px;
    letter-spacing: 1px;
}
.login-entry-tag.tag-front { background: #e8f5ee; color: #157347; border: 1px solid #c6e9d5; }
.login-entry-tag.tag-admin { background: #fdf0ef; color: #b3261e; border: 1px solid #edc9c6; }
.login-cross { margin-top: 16px; font-size: 12px; color: var(--muted); text-align: center; }
.login-cross a { color: #b3261e; }

/* 前台填报入口采用绿色系，后台管理入口采用红色系，界面一眼可区分 */
.login-area-front .login-visual { background: #0e3529; }
.login-area-front .login-brand-mark { background: #157347; }
.login-area-front .login-copy h1 em { color: #9fe0c0; }
.login-area-front .login-submit { background: #157347; border-color: #157347; }
.login-area-front .login-submit:hover { background: #11603b; }
.login-area-front .login-kicker { color: #b9e6cf; }
.login-area-front .login-entry-tag.tag-front { background: #e8f5ee; color: #157347; border-color: #c6e9d5; }
