/* 燃气设备物资一体化管控平台 - 全局样式 */
:root {
    --primary: #1e3a5f;        /* 深蓝主色 */
    --primary-light: #2c5f8d;
    --accent: #2d7d6e;         /* 蓝绿强调色 */
    --accent-light: #3a9d8a;
    --bg: #f0f2f5;
    --card-bg: #ffffff;
    --text: #333333;
    --text-light: #888888;
    --border: #e0e0e0;
    --success: #27ae60;
    --warning: #f39c12;
    --danger: #e74c3c;
    --info: #3498db;
    --shadow: 0 2px 8px rgba(0,0,0,0.06);
    --shadow-hover: 0 4px 12px rgba(0,0,0,0.1);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: "Microsoft YaHei", "Segoe UI", sans-serif; background: var(--bg); color: var(--text); font-size: 14px; }

/* ============ 登录页 ============ */
.login-page { display: flex; justify-content: center; align-items: center; min-height: 100vh; min-height: 100svh;
    padding: 20px 16px;
    padding: max(20px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right))
        max(20px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
    background: linear-gradient(135deg, #1e3a5f 0%, #2d7d6e 100%); }
.login-box { background: #fff; border-radius: 12px; padding: 40px; width: 420px; max-width: 100%;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3); }
.login-header { text-align: center; margin-bottom: 30px; }
.login-logo { width: 80px; height: 80px; object-fit: contain; margin-bottom: 12px; border-radius: 8px; }
.login-header h1 { color: var(--primary); font-size: 22px; margin-bottom: 6px; }
.login-header p { color: #666; font-size: 14px; font-weight: 600; }
.login-header .login-sub { color: #aaa; font-size: 12px; font-weight: 400; margin-top: 6px; }
.login-form .form-group { margin-bottom: 18px; }
.login-form label { display: block; margin-bottom: 6px; color: #555; font-weight: 600; }
.login-form input { width: 100%; min-width: 0; padding: 10px 12px; border: 1px solid #ddd; border-radius: 6px;
    font-size: 16px; transition: border-color 0.2s, box-shadow 0.2s; }
.login-form input:focus { outline: none; border-color: var(--accent); }
.login-form input:focus-visible { box-shadow: 0 0 0 3px rgba(45,125,110,0.15); }
.login-password-wrap { display: flex; align-items: stretch; position: relative; }
.login-password-wrap input { padding-right: 68px; }
.login-password-toggle { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); min-width: 56px;
    min-height: 40px; padding: 0 8px; border: 0; border-radius: 4px; background: transparent;
    color: var(--primary-light); font-size: 14px; cursor: pointer; touch-action: manipulation; }
.login-password-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.btn-login { width: 100%; padding: 12px; background: var(--accent); color: #fff; border: none; border-radius: 6px;
    min-height: 48px; font-size: 16px; cursor: pointer; transition: background 0.2s; touch-action: manipulation; }
.btn-login:hover { background: var(--primary); }
.btn-login:disabled { opacity: 0.7; cursor: wait; }
.login-error { color: var(--danger); margin-top: 10px; text-align: center; min-height: 20px; font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.login-error.is-loading { color: var(--info); }
.login-error.is-network-info { color: var(--info); }
.login-tip { margin-top: 20px; padding-top: 20px; border-top: 1px dashed #eee; color: #aaa; font-size: 12px; line-height: 1.8; }

.recommendation-note { color: #777; font-size: 12px; margin: -6px 0 10px; }
.recommendation-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.recommendation-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; background: #fff; border-left: 4px solid #ed8936; border-radius: 6px; box-shadow: var(--shadow); }
.recommendation-item.critical { border-left-color: #c53030; }
.recommendation-item.high { border-left-color: #dd6b20; }
.recommendation-item.medium { border-left-color: #4299e1; }
.recommendation-main { min-width: 0; }
.recommendation-title { font-weight: 600; margin-bottom: 5px; }
.recommendation-reason { color: #555; font-size: 13px; line-height: 1.6; }
@media (max-width: 600px) {
    .recommendation-item { align-items: flex-start; }
    .recommendation-item > .btn { flex-shrink: 0; }
}

/* ============ 主界面布局 ============ */
.main-app { min-height: 100vh; }
.topbar { height: 56px; background: var(--primary); color: #fff; display: flex; justify-content: space-between;
    align-items: center; padding: 0 20px; position: sticky; top: 0; z-index: 100; box-shadow: 0 2px 8px rgba(0,0,0,0.15); }
.topbar-left { display: flex; align-items: center; gap: 12px; }
.menu-toggle { font-size: 20px; cursor: pointer; padding: 4px 8px; display: none; }
.topbar-logo { width: 32px; height: 32px; object-fit: contain; border-radius: 4px; background: #fff; padding: 2px; }
.topbar-title { font-size: 18px; font-weight: 600; }
.topbar-company { font-size: 12px; color: rgba(255,255,255,0.7); padding: 2px 8px; background: rgba(255,255,255,0.1); border-radius: 10px; }
.topbar-right { display: flex; align-items: center; gap: 16px; }
.user-info { font-size: 13px; }
.btn-logout { background: rgba(255,255,255,0.15); color: #fff; border: 1px solid rgba(255,255,255,0.3);
    padding: 6px 14px; border-radius: 4px; cursor: pointer; font-size: 13px; }
.btn-logout:hover { background: rgba(255,255,255,0.25); }

/* 通知图标 */
.notif-bell { position: relative; cursor: pointer; font-size: 18px; padding: 4px; }
.notif-badge { position: absolute; top: -2px; right: -6px; background: var(--danger); color: #fff;
    font-size: 10px; min-width: 16px; height: 16px; line-height: 16px; text-align: center; border-radius: 8px; padding: 0 4px; font-weight: 700; }

.layout { display: flex; }
.sidebar { width: 240px; background: #fff; min-height: calc(100vh - 56px); border-right: 1px solid var(--border);
    transition: width 0.2s; overflow-y: auto; }
.sidebar.collapsed { width: 0; overflow: hidden; }
.content { flex: 1; padding: 20px; overflow-x: auto; min-width: 0; }
.page-title { font-size: 20px; font-weight: 600; color: var(--primary); margin-bottom: 20px; padding-bottom: 10px;
    border-bottom: 2px solid var(--accent); }

/* ============ 侧边栏菜单 ============ */
.nav { list-style: none; padding: 8px 0; }
.nav li { margin: 0; }
.nav a { display: block; padding: 10px 20px; color: #555; text-decoration: none; font-size: 14px;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1); border-left: 3px solid transparent; border-radius: 0 6px 6px 0; }
.nav a:hover { background: linear-gradient(90deg, #f5f7fa 0%, #e8f5f1 100%); color: var(--accent); transform: translateX(2px); }
.nav a.active { background: linear-gradient(90deg, #e8f5f1 0%, #d4ebe5 100%); color: var(--accent); border-left-color: var(--accent); font-weight: 600; }
.nav-group-title { cursor: pointer; display: flex; justify-content: space-between; align-items: center; transition: all 0.2s; }
.nav-arrow { font-size: 10px; transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1); }
.nav-group.open .nav-arrow { transform: rotate(180deg); }
.nav-submenu { list-style: none; display: none; background: #fafbfc; }
.nav-group.open .nav-submenu { display: block; animation: submenuIn 0.2s ease-out; }
@keyframes submenuIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
.nav-submenu a { padding-left: 40px; font-size: 13px; }

/* ============ 通用组件 ============ */
.page { animation: fadeIn 0.25s ease-out; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.btn { padding: 8px 16px; border: none; border-radius: 4px; cursor: pointer; font-size: 14px; transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1); }
.btn:hover { transform: translateY(-1px); box-shadow: 0 4px 8px rgba(0,0,0,0.12); }
.btn:active { transform: translateY(0); box-shadow: none; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--primary); }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #229954; }
.btn-warning { background: var(--warning); color: #fff; }
.btn-warning:hover { background: #d68910; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #c0392b; }
.btn-default { background: #fff; color: #555; border: 1px solid #ddd; }
.btn-default:hover { background: #f5f5f5; }
.btn-sm { padding: 4px 10px; font-size: 12px; }

/* 工具栏 */
/* Tab切换样式 */
.tabs { display: flex; border-bottom: 2px solid #e0e0e0; margin-bottom: 16px; }
.tab-item { padding: 10px 20px; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px; transition: all 0.2s; font-size: 14px; color: #666; }
.tab-item:hover { color: var(--primary); }
.tab-item.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }

.toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; flex-wrap: wrap; gap: 10px; }
.toolbar-left { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.toolbar-right { display: flex; gap: 8px; }
.report-ledger-toolbar-right { flex-wrap: wrap; justify-content: flex-end; }
.report-ledger-toolbar-right .report-filter-hint { flex: 0 0 auto; white-space: nowrap; }
.report-ledger-toolbar-right .btn { white-space: nowrap; }
.report-filter-bar { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 10px; margin: 0 0 16px; padding: 14px; background: #fff; border: 1px solid #e5eaf0; border-radius: 8px; }
.report-quick-filter-group { flex: 1 0 100%; display: flex; flex-direction: column; gap: 7px; }
.report-quick-filter-title { color: #5b6573; font-size: 12px; }
.report-quick-filter-options { display: flex; flex-wrap: wrap; gap: 7px; }
.report-quick-filter { padding: 6px 10px; color: #536173; background: #f6f8fb; border: 1px solid #dfe5ec; border-radius: 18px; cursor: pointer; font-size: 12px; }
.report-quick-filter span { margin-left: 4px; color: #7b8490; }
.report-quick-filter:hover, .report-quick-filter.active { color: #1e3a5f; background: #eaf2fb; border-color: #8aa9cc; }
.report-quick-filter.active { font-weight: 600; }
.report-distribution { margin: 0 0 14px; padding: 12px; background: #fff; border: 1px solid #e5eaf0; border-radius: 8px; }
.report-distribution > .report-distribution-summary { display: flex; align-items: center; gap: 10px; cursor: pointer; list-style: none; }
.report-distribution > .report-distribution-summary::-webkit-details-marker { display: none; }
.report-distribution > .report-distribution-summary::before { content: '›'; color: #61758f; font-size: 20px; transition: transform .15s ease; }
.report-distribution[open] > .report-distribution-summary::before { transform: rotate(90deg); }
.report-distribution-summary h4 { margin: 0; color: #1e3a5f; font-size: 14px; }
.report-distribution-summary > span { margin-left: auto; color: #697586; font-size: 11px; white-space: nowrap; }
.report-distribution-content { margin-top: 10px; }
.report-distribution-overview { margin-bottom: 8px; }
.report-ledger-sections { display: grid; gap: 6px; }
.report-ledger-section { overflow: hidden; border: 1px solid #e8edf3; border-radius: 6px; }
.report-ledger-section > summary { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 11px; color: #34445a; background: #f7f9fc; cursor: pointer; list-style: none; }
.report-ledger-section > summary::-webkit-details-marker { display: none; }
.report-ledger-section > summary::before { content: '›'; color: #61758f; font-size: 18px; transition: transform .15s ease; }
.report-ledger-section[open] > summary::before { transform: rotate(90deg); }
.report-ledger-section > summary strong { flex: 1; font-size: 12px; }
.report-ledger-section > summary span { color: #697586; font-size: 11px; white-space: nowrap; }
.report-ledger-section .table-wrap { box-shadow: none; }
.report-distribution-overview .table-wrap { box-shadow: none; border: 1px solid #edf0f4; }
.report-distribution-overview .data-table { min-width: 0; }
.report-distribution-overview .data-table th { padding-top: 7px; padding-bottom: 7px; }
.report-distribution-overview .data-table td { vertical-align: middle; }
.report-distribution-group-cell { min-width: 150px; width: 22%; }
.report-distribution-group-cell > strong { display: block; color: #29384b; font-size: 12px; }
.report-distribution-group-cell > span { display: block; margin-top: 3px; color: #697586; font-size: 11px; }
.report-location-list { display: flex; flex-wrap: wrap; gap: 5px; }
.report-location-tag { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; padding: 4px 7px; color: #536173; background: #f5f8fb; border: 1px solid #e8edf3; border-radius: 5px; font-size: 11px; }
.report-location-tag strong { color: #34445a; overflow-wrap: anywhere; }
.report-location-tag > span { color: #1e3a5f; font-weight: 600; white-space: nowrap; }
.report-location-tag b { padding-left: 5px; color: #276b87; border-left: 1px solid #d8e1ea; white-space: nowrap; }
.report-location-empty { color: #8490a0; font-size: 11px; }
.report-distribution-chart-details { margin-top: 6px; }
.report-distribution-chart-details > summary { width: fit-content; color: #536173; cursor: pointer; font-size: 12px; }
.report-distribution-chart-details[open] > summary { margin-bottom: 10px; }
.report-result-overview { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 0 0 12px; padding: 11px 14px; color: #657287; background: #f6f9fc; border-left: 3px solid #3b82a0; border-radius: 5px; font-size: 12px; }
.report-result-overview > div { display: flex; align-items: baseline; gap: 10px; }
.report-result-eyebrow { color: #526277; }
.report-result-overview strong { color: #1e3a5f; font-size: 20px; }
.report-result-overview strong small { color: #8490a0; font-size: 12px; font-weight: 400; }
.report-source-table { margin: 0 0 18px; background: #fff; border: 1px solid #e5eaf0; border-radius: 8px; }
.report-source-table > summary { padding: 12px 14px; color: #34445a; background: #f8fafc; cursor: pointer; font-size: 13px; font-weight: 600; }
.report-source-table[open] > summary { border-bottom: 1px solid #e5eaf0; }
.report-source-table .table-wrap { box-shadow: none; }
.report-distribution-groups { display: grid; gap: 8px; }
.report-distribution-group { overflow: hidden; border: 1px solid #e5eaf0; border-radius: 6px; }
.report-distribution-group > summary { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 12px; background: #f8fafc; cursor: pointer; list-style: none; }
.report-distribution-group > summary::-webkit-details-marker { display: none; }
.report-distribution-group > summary::before { content: '›'; color: #61758f; font-size: 18px; transition: transform .15s ease; }
.report-distribution-group[open] > summary::before { transform: rotate(90deg); }
.report-distribution-name { flex: 1; color: #29384b; font-size: 13px; font-weight: 600; }
.report-distribution-total { color: #1e3a5f; font-size: 13px; text-align: right; }
.report-distribution-total small { display: block; margin-top: 3px; color: #7b8490; font-size: 11px; font-weight: 400; }
.report-distribution-table { box-shadow: none !important; }
.report-distribution-table th, .report-distribution-table td { padding: 8px 10px; }
.report-distribution-chart-wrap { position: relative; height: 240px; margin: 12px 14px 18px; }
.report-filter-field { display: flex; flex-direction: column; gap: 5px; min-width: 145px; color: #5b6573; font-size: 12px; }
.report-filter-field input, .report-filter-field select { width: 100%; min-height: 36px; padding: 7px 9px; color: #333; background: #fff; border: 1px solid #d5dce5; border-radius: 5px; font: inherit; }
.report-search-field { flex: 1 1 260px; }
.report-filter-actions { display: flex; gap: 8px; }
.report-filter-hint { flex: 1 0 100%; color: #7b8490; font-size: 12px; }
.report-result-count { margin: 0 0 10px; color: #697586; font-size: 13px; }
.report-result-count strong { color: #1e3a5f; }
.report-screen-note { margin: 0 0 10px; color: #7b8490; font-size: 12px; }
.report-ledger-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; border-bottom: 1px solid #dfe5ec; }
.report-ledger-tab { padding: 10px 16px; color: #627083; background: transparent; border: 0; border-bottom: 3px solid transparent; cursor: pointer; font: inherit; }
.report-ledger-tab:hover, .report-ledger-tab.active { color: var(--primary); }
.report-ledger-tab.active { border-bottom-color: var(--primary); font-weight: 600; }
.filter-input, .filter-select { padding: 6px 10px; border: 1px solid #ddd; border-radius: 4px; font-size: 13px; }
.filter-input:focus, .filter-select:focus { outline: none; border-color: var(--accent); }

/* 表格 */
.table-wrap { background: #fff; border-radius: 8px; overflow: hidden; box-shadow: var(--shadow); }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.data-table { width: 100%; border-collapse: collapse; }
.data-table th { background: #f5f7fa; padding: 12px 10px; text-align: left; font-weight: 600; color: #555;
    border-bottom: 2px solid var(--border); font-size: 13px; white-space: nowrap; }
.data-table td { padding: 10px; border-bottom: 1px solid #eee; font-size: 13px; transition: background 0.2s ease; }
.data-table tr { transition: background 0.2s ease; }
.data-table tr:hover { background: #f5f9ff; }
.data-table .empty-row td { text-align: center; color: #aaa; padding: 40px; }

/* 状态标签 */
.badge { display: inline-block; padding: 2px 10px; border-radius: 12px; font-size: 12px; font-weight: 600; }
.badge-success { background: #d4edda; color: #155724; }
.badge-warning { background: #fff3cd; color: #856404; }
.badge-danger { background: #f8d7da; color: #721c24; }
.badge-secondary { background: #e2e3e5; color: #383d41; }
.badge-info { background: #d1ecf1; color: #0c5460; }
.badge-primary { background: #cce5ff; color: #004085; }
.badge-purple { background: #e2d9f3; color: #4a148c; }

/* 区块标题 */
.stat-section-title { font-size: 16px; font-weight: 600; color: var(--primary); margin: 24px 0 12px; padding-left: 10px;
    border-left: 4px solid var(--accent); display: flex; align-items: center; gap: 8px; }
.stat-section-title .section-count { font-size: 13px; color: var(--text-light); font-weight: 400; }
.stat-section-title .section-link { margin-left: auto; font-size: 13px; color: var(--accent); cursor: pointer; font-weight: 400; }
.stat-section-title .section-link:hover { text-decoration: underline; }

/* 统计卡片 */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; margin-bottom: 8px; }
.stat-card { background: #fff; border-radius: 8px; padding: 20px; box-shadow: var(--shadow); border-left: 4px solid var(--accent);
    transition: transform 0.15s, box-shadow 0.15s; cursor: default; overflow: visible; }
.stat-card.clickable { cursor: pointer; }
.stat-card.clickable:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.stat-card .stat-icon { font-size: 22px; margin-bottom: 6px; }
.stat-card .stat-label { color: var(--text-light); font-size: 13px; margin-bottom: 8px; }
.stat-card .stat-value { font-size: 28px; font-weight: 700; color: var(--text); }
.stat-card.warning { border-left-color: var(--warning); }
.stat-card.warning .stat-value { color: var(--warning); }
.stat-card.danger { border-left-color: var(--danger); }
.stat-card.danger .stat-value { color: var(--danger); }
.stat-card.success { border-left-color: var(--success); }
.stat-card.success .stat-value { color: var(--success); }
/* 预警卡片：红色边框 + 红色数字 + 预警图标 */
.stat-card.warn { border: 2px solid var(--danger); border-left-width: 4px; background: #fff5f5; }
.stat-card.warn .stat-value { color: var(--danger); }
.stat-card.warn .stat-label { color: var(--danger); }
.stat-card.warn .stat-icon::after { content: " ⚠"; }

.stat-card-actions { margin-top: 10px; display: flex; gap: 6px; }
.stat-card-actions .btn-xs { padding: 4px 8px; font-size: 11px; }

/* 卡片智能化：占比文字 + 进度条 */
.stat-card .stat-sub { font-size: 11px; color: var(--text-light); margin-top: 6px; line-height: 1.3; }
.stat-card .stat-sub .stat-sub-frac { color: #aab0bb; margin-left: 2px; }
.stat-card .stat-bar { margin-top: 5px; height: 4px; border-radius: 3px; background: #eef0f3; overflow: hidden; }
.stat-card .stat-bar-fill { display: block; height: 100%; border-radius: 3px; background: var(--accent); transition: width 0.4s ease; }
.stat-card .stat-bar-fill.danger { background: var(--danger); }
.stat-card .stat-bar-fill.warning { background: var(--warning); }
.stat-card .stat-bar-fill.info { background: var(--accent); }

/* 合规预警中心：卡片深链定位高亮 */
.cw-sec { scroll-margin-top: 12px; border-radius: 6px; }
.cw-focus-hint { margin: 0 0 12px; padding: 9px 12px; color: #1e3a5f; background: #eef6fc; border-left: 3px solid var(--accent); border-radius: 4px; }
.cw-highlight { animation: cwFlash 1.6s ease; }
@keyframes cwFlash {
    0%, 100% { box-shadow: 0 0 0 0 rgba(229, 62, 62, 0); background: transparent; }
    20%, 60% { box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.35); background: #fff5f5; }
}

/* 高频快捷操作入口 */
.qa-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; margin-bottom: 8px; }
.qa-card { display: flex; align-items: center; gap: 12px; background: #fff; border-radius: 10px; padding: 13px 15px;
    box-shadow: var(--shadow); cursor: pointer; border: 1px solid #eef0f3; transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s; }
.qa-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); border-color: var(--accent); }
.qa-card:active { transform: translateY(0); }
.qa-icon { position: relative; width: 42px; height: 42px; flex: 0 0 42px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; font-size: 20px; background: #eef4ff; }
.qa-badge { position: absolute; top: -4px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
    background: var(--danger); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; box-shadow: 0 0 0 2px #fff; }
.qa-text { min-width: 0; flex: 1; }
.qa-label { font-size: 14px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qa-desc { font-size: 12px; color: var(--text-light); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qa-desc .qa-use { color: var(--accent); font-weight: 600; }
.qa-empty { grid-column: 1 / -1; color: var(--text-light); font-size: 13px; padding: 8px 0; }

/* 图表样式 */
.charts-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-bottom: 16px; max-width: 100%; overflow: hidden; }
.chart-card { background: #fff; border-radius: 8px; padding: 16px; box-shadow: var(--shadow); height: 280px; display: flex; flex-direction: column; overflow: hidden; position: relative; }
.chart-card .chart-title { font-size: 14px; font-weight: 600; color: var(--primary); margin-bottom: 8px; flex-shrink: 0; }
.chart-card canvas { flex: 1; width: 100%; height: 100%; display: block; }
.chart-card::after { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 1px; background: transparent; pointer-events: none; }

/* 复选框样式 */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    margin-right: 10px;
    font-size: 13px;
    user-select: none;
}
.checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}
.data-table th input[type="checkbox"],
.data-table td input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* 批量操作栏 */
.batch-bar {
    display: none;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #e8f5f1 0%, #d4ebe5 100%);
    border: 1px solid var(--accent);
    border-radius: 8px;
    animation: fadeIn 0.2s ease-out;
}
.batch-bar.active { display: flex; }
.batch-bar .batch-info {
    font-size: 13px;
    color: var(--primary);
    font-weight: 600;
}
.batch-bar .batch-info .batch-count {
    color: var(--danger);
    font-size: 15px;
    margin: 0 2px;
}
.batch-bar .batch-actions { display: flex; gap: 8px; margin-left: auto; }

/* 表格行选中高亮 */
.data-table tr.row-selected {
    background: #e8f5f1 !important;
}
.data-table tr.row-selected:hover {
    background: #d4ebe5 !important;
}

/* 筛选面板 */
.filter-panel {
    background: #fff;
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 12px;
    box-shadow: var(--shadow);
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}
.filter-panel .filter-group {
    display: flex;
    align-items: center;
    gap: 6px;
}
.filter-panel .filter-group label {
    font-size: 13px;
    color: #555;
    font-weight: 600;
    white-space: nowrap;
}
.filter-panel .filter-group input,
.filter-panel .filter-group select {
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    min-width: 120px;
}
.filter-panel .filter-group input:focus,
.filter-panel .filter-group select:focus {
    outline: none;
    border-color: var(--accent);
}
.filter-panel .filter-actions {
    display: flex;
    gap: 6px;
    margin-left: auto;
}

/* 待办列表 */
.todo-list, .alert-list { background: #fff; border-radius: 8px; box-shadow: var(--shadow); overflow: hidden; }
.todo-item, .alert-item { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid #f0f0f0; flex-wrap: wrap; }
.todo-item:last-child, .alert-item:last-child { border-bottom: none; }
.todo-item:hover, .alert-item:hover { background: #fafbfc; }
.todo-item.urgent, .alert-item.urgent { background: #fff5f5; border-left: 3px solid var(--danger); }
.todo-item.urgent:hover, .alert-item.urgent:hover { background: #ffeaea; }
.todo-main { flex: 1; min-width: 200px; }
.todo-title { font-weight: 600; color: var(--text); margin-bottom: 4px; }
.todo-title.urgent { color: var(--danger); }
.todo-meta { font-size: 12px; color: var(--text-light); display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.todo-actions { display: flex; gap: 8px; }
.priority-tag { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 11px; font-weight: 600; }
.priority-urgent { background: var(--danger); color: #fff; }
.priority-high { background: var(--warning); color: #fff; }
.priority-normal { background: #e2e3e5; color: #383d41; }
.priority-low { background: #d1ecf1; color: #0c5460; }
.due-soon { color: var(--warning); font-weight: 600; }
.due-overdue { color: var(--danger); font-weight: 600; }

/* 告警列表（提示/重要/紧急三色） */
.alert-item .alert-level { padding: 2px 10px; border-radius: 10px; font-size: 11px; font-weight: 700; color: #fff; white-space: nowrap; }
.alert-level-info { background: var(--info); }
.alert-level-important { background: var(--warning); }
.alert-level-urgent { background: var(--danger); }
.alert-item.urgent { animation: alertBlink 2s ease-in-out infinite; }
@keyframes alertBlink { 0%,100% { box-shadow: 0 0 0 0 rgba(220,53,69,0); } 50% { box-shadow: 0 0 12px 4px rgba(220,53,69,0.25); } }
.alert-item.processed { opacity: 0.55; }
.alert-content { color: var(--text-light); font-size: 12px; margin-top: 4px; }

/* 关注动态时间线 */
.follow-timeline { background: #fff; border-radius: 8px; box-shadow: var(--shadow); padding: 20px; }
.timeline-item { position: relative; padding-left: 24px; padding-bottom: 18px; border-left: 2px solid #e8e8e8; margin-left: 8px; }
.timeline-item:last-child { border-left-color: transparent; padding-bottom: 0; }
.timeline-item::before { content: ""; position: absolute; left: -6px; top: 2px; width: 10px; height: 10px;
    border-radius: 50%; background: var(--accent); border: 2px solid #fff; box-shadow: 0 0 0 2px var(--accent); }
.timeline-name { font-weight: 600; color: var(--primary); }
.timeline-event { color: var(--text); margin: 4px 0; }
.timeline-time { font-size: 12px; color: var(--text-light); }

/* 快捷操作 */
.quick-actions { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.quick-action { background: #fff; border-radius: 8px; padding: 18px; text-align: center; cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1); box-shadow: var(--shadow); border-top: 3px solid var(--accent); }
.quick-action:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.quick-action .qa-icon { font-size: 28px; margin-bottom: 8px; }
.quick-action .qa-text { font-size: 13px; color: #555; }

/* 模态框 */
.modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5);
    z-index: 999; display: flex; justify-content: center; align-items: center;
    animation: fadeIn 0.2s ease-out; }
.modal-box { background: #fff; border-radius: 8px; width: 90%; max-width: 700px; max-height: 90vh;
    overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: modalIn 0.3s cubic-bezier(0.16, 1, 0.3, 1); }
@keyframes modalIn { from { opacity: 0; transform: scale(0.95) translateY(10px); } to { opacity: 1; transform: scale(1) translateY(0); } }
.modal-header { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px;
    border-bottom: 1px solid #eee; position: sticky; top: 0; background: #fff; z-index: 1; }
.modal-header h3 { color: var(--primary); font-size: 17px; }
.modal-close { background: none; border: none; font-size: 24px; cursor: pointer; color: #999; line-height: 1; }
.modal-close:hover { color: #333; }
.modal-body { padding: 20px; }
.modal-footer { padding: 16px 20px; border-top: 1px solid #eee; display: flex; justify-content: flex-end; gap: 10px; }

/* 表单 */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid.three-col { grid-template-columns: 1fr 1fr 1fr; }
.form-grid.full { grid-template-columns: 1fr; }
.eqmt-cascade { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.eqmt-cascade .filter-select { width: 100%; min-width: 0; }
.eqmt-cascade-hint { display: block; font-weight: 400; color: #999; font-size: 12px; margin-top: 2px; }
@media (max-width: 900px) { .eqmt-cascade { grid-template-columns: 1fr 1fr; } }
.form-group { margin-bottom: 12px; }
.form-group label { display: block; margin-bottom: 5px; color: #555; font-weight: 600; font-size: 13px; }
.form-group label .req { color: var(--danger); }
.form-group input, .form-group select, .form-group textarea {
    width: 100%; padding: 8px 10px; border: 1px solid #ddd; border-radius: 4px; font-size: 13px; }
.login-form .form-group input { font-size: 16px; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { outline: none; border-color: var(--accent); }
.form-group textarea { resize: vertical; min-height: 60px; }
.form-group.full { grid-column: 1 / -1; }
.hidden { display: none !important; }

/* 分页 */
.pagination { display: flex; justify-content: center; align-items: center; gap: 6px; margin-top: 16px; flex-wrap: wrap; }
.pagination button { min-width: 32px; height: 32px; border: 1px solid #ddd; background: #fff; cursor: pointer;
    border-radius: 4px; font-size: 13px; }
.pagination button:hover { background: #f5f5f5; }
.pagination button.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.pagination button:disabled { opacity: 0.5; cursor: not-allowed; }
.pagination .page-info { padding: 0 10px; color: var(--text-light); font-size: 13px; }
.pagination .page-ellipsis { padding: 0 6px; color: #999; font-size: 13px; }
.pagination .page-jump { display: inline-flex; align-items: center; gap: 4px; color: var(--text-light); font-size: 13px; margin-left: 8px; }
.pagination .page-jump-input { width: 50px; height: 28px; border: 1px solid #ddd; border-radius: 4px; text-align: center; font-size: 13px; padding: 0 4px; }
.pagination .pg-first, .pagination .pg-last { font-weight: bold; }
.pagination .pg-jump-go { height: 28px; padding: 0 10px; border: 1px solid #ddd; background: #fff; border-radius: 4px; cursor: pointer; font-size: 13px; }
.pagination .pg-jump-go:hover { background: #f5f5f5; }

/* 占位页 */
.placeholder-box { text-align: center; padding: 80px 20px; color: #aaa; }
.placeholder-box .placeholder-icon { font-size: 56px; margin-bottom: 16px; }
.placeholder-box h2 { font-size: 22px; margin-bottom: 12px; color: #999; }

/* 空状态 */
.empty-state { text-align: center; padding: 40px 20px; color: #aaa; }
.empty-state .empty-icon { font-size: 40px; margin-bottom: 12px; }

/* Toast 提示 */
#toast-container { position: fixed; top: 70px; right: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; }
.toast { padding: 12px 20px; border-radius: 6px; color: #fff; font-size: 14px; box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    animation: slideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1); max-width: 320px; }
.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }
.toast.warning { background: var(--warning); }
.toast.info { background: var(--info); }
@keyframes slideIn { from { transform: translateX(100%) scale(0.95); opacity: 0; } to { transform: translateX(0) scale(1); opacity: 1; } }

/* 通知列表项 */
.notif-item { display: flex; gap: 12px; padding: 14px 16px; border-bottom: 1px solid #f0f0f0; align-items: flex-start; }
.notif-item.unread { background: #f0f7ff; }
.notif-item:hover { background: #fafbfc; }
.notif-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--danger); margin-top: 6px; flex-shrink: 0; }
.notif-dot.read { background: #ccc; }
.notif-main { flex: 1; }
.notif-title { font-weight: 600; margin-bottom: 4px; }
.notif-item.read .notif-title { color: var(--text-light); font-weight: 400; }
.notif-time { font-size: 12px; color: var(--text-light); }

/* ============ 移动端响应式 ============ */
@media (max-width: 768px) {
    /* 登录页 */
    .login-page { align-items: center; overflow-y: auto; -webkit-overflow-scrolling: touch; }
    .login-box { width: min(100%, 440px); padding: 24px 20px; }
    .login-logo { width: 60px; height: 60px; }
    .login-header h1 { font-size: 18px; }
    .login-header p { font-size: 12px; }
    .login-header .login-sub { font-size: 11px; }
    .login-header { margin-bottom: 22px; }
    .btn-login { padding: 14px; font-size: 16px; -webkit-appearance: none; appearance: none; }
    .login-form input { padding: 12px; font-size: 16px; -webkit-appearance: none; appearance: none; }
    .login-form .form-group { margin-bottom: 16px; }

    /* 主界面 */
    .topbar { padding: 0 12px; height: 50px; }
    .topbar-title { font-size: 14px; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .topbar-company { display: none; }
    .topbar-logo { width: 28px; height: 28px; }
    .menu-toggle { display: block; font-size: 22px; }
    .user-info { display: none; }

    /* 侧边栏 - 移动端抽屉式 */
    .sidebar { position: fixed; left: -260px; top: 50px; bottom: 0; width: 260px; z-index: 1000;
        transition: left 0.3s; overflow-y: auto; }
    .sidebar.open { left: 0; box-shadow: 2px 0 12px rgba(0,0,0,0.2); }
    .sidebar-overlay { display: none; position: fixed; top: 50px; left: 0; right: 0; bottom: 0;
        background: rgba(0,0,0,0.4); z-index: 999; }
    .sidebar-overlay.show { display: block; }

    /* 内容区 */
    .content { width: 100%; padding: 12px; }
    .page-title { font-size: 17px; margin-bottom: 14px; }

    /* 统计卡片 */
    .stats-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 8px; }
    .stat-card { padding: 12px; }
    .stat-card .stat-value { font-size: 20px; }
    .stat-card .stat-label { font-size: 11px; }

    /* 表格滚动 */
    .data-table { font-size: 12px; }
    .table-wrap, .table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

    /* 工具栏 */
    .toolbar { flex-direction: column; align-items: stretch; gap: 8px; }
    .toolbar-left, .toolbar-right { width: 100%; }
    .toolbar input, .toolbar select, .filter-input, .filter-select { width: 100%; }
    .report-filter-bar { align-items: stretch; padding: 10px; }
    .report-filter-field, .report-search-field { flex: 1 1 100%; min-width: 0; }
    .report-filter-actions { width: 100%; }
    .report-filter-actions .btn { flex: 1; }
    .report-ledger-tabs { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .report-ledger-tab { flex: 0 0 auto; padding: 9px 12px; white-space: nowrap; }
    .report-distribution { padding: 10px; }
    .report-distribution-heading, .report-distribution-group > summary { align-items: flex-start; }
    .report-distribution-summary { flex-wrap: wrap; }
    .report-distribution-summary > span { margin-left: auto; }
    .report-ledger-section > summary { align-items: flex-start; }
    .report-ledger-section > summary span { white-space: normal; text-align: right; }
    .report-distribution-group-cell { min-width: 120px; }
    .report-location-list { min-width: 0; }
    .report-location-tag { padding: 4px 6px; }
    .report-result-overview { align-items: flex-start; flex-direction: column; }
    .report-result-overview > div { flex-wrap: wrap; }
    .report-distribution-group > summary { flex-wrap: wrap; }
    .report-distribution-name { min-width: calc(100% - 30px); }
    .report-distribution-total { margin-left: 24px; text-align: left; }
    .report-distribution-chart-wrap { height: 210px; margin: 8px 8px 14px; }

    /* 表单弹窗 */
    .modal-box { width: 95%; max-height: 85vh; }
    .form-grid, .form-grid.three-col { grid-template-columns: 1fr; }

    /* 待办/告警项 */
    .todo-item, .alert-item { padding: 12px; }
    .todo-actions { width: 100%; }

    /* 快捷操作 */
    .quick-actions { grid-template-columns: repeat(2, 1fr); }

    /* 分页 */
    .pagination button { padding: 6px 10px; font-size: 12px; }

    /* Toast */
    #toast-container { left: 12px; right: 12px; top: 60px; }
    .toast { max-width: none; }
}

@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .login-page { min-height: 100vh; min-height: 100dvh; padding: 16px 12px;
        padding: max(16px, env(safe-area-inset-top))
        max(12px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom))
        max(12px, env(safe-area-inset-left)); }
    .login-box { padding: 20px 16px; border-radius: 10px; }
    .login-header { margin-bottom: 18px; }
    .login-logo { width: 52px; height: 52px; margin-bottom: 8px; }
    .login-header h1 { font-size: clamp(16px, 4.8vw, 18px); }
    .login-tip { margin-top: 14px; padding-top: 14px; text-align: center; }
    .content { padding: 8px; }
    .quick-actions { grid-template-columns: 1fr 1fr; }
}

@media (max-height: 600px) {
    .login-page { align-items: flex-start; }
    .login-box { width: min(100%, 440px); margin: 8px auto; padding-top: 16px; padding-bottom: 16px; }
    .login-logo { width: 40px; height: 40px; margin-bottom: 4px; }
    .login-header { margin-bottom: 12px; }
    .login-header .login-sub { display: none; }
    .login-tip { margin-top: 10px; padding-top: 10px; }
}

.attachment-list {
    border: 1px dashed var(--border);
    border-radius: 6px;
    padding: 12px;
    min-height: 60px;
}
.attachment-empty {
    text-align: center;
    color: var(--text-light);
    font-size: 13px;
    padding: 16px 0;
}
.attachment-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    background: #f8f9fa;
    border-radius: 4px;
    margin-bottom: 8px;
}
.attachment-item:last-child {
    margin-bottom: 12px;
}
.att-icon {
    font-size: 20px;
    flex-shrink: 0;
}
.att-info {
    flex: 1;
    min-width: 0;
}
.att-name {
    display: block;
    font-size: 13px;
    color: var(--primary);
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.att-name:hover {
    text-decoration: underline;
}
.att-size {
    font-size: 11px;
    color: var(--text-light);
}
.attachment-upload-btn {
    width: 100%;
    padding: 10px;
    margin-top: 8px;
}
