/* 全局字体 */
* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Microsoft YaHei"; 
}
body { background-color: #f0f2f5; color: #333; }
/* ================= 全屏登录界面（深色系） ================= */
#loginPage { 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background: linear-gradient(135deg, #2c3e50 0%, #1a252f 100%); 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    z-index: 9999; 
}
.login-card { background: #fff; width: 400px; padding: 40px; border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,0.3); }
.login-card h2 { text-align: center; color: #2c3e50; margin-bottom: 30px; font-size: 24px; }
.login-card .form-item { margin-bottom: 20px; }
.login-card label { display: block; margin-bottom: 8px; color: #666; font-size: 14px; }
.login-card input { width: 100%; padding: 12px; border: 1px solid #ddd; border-radius: 6px; font-size: 15px; outline: none; transition: border 0.3s; }
.login-card input:focus { border-color: #2c3e50; box-shadow: 0 0 0 3px rgba(44, 62, 80, 0.1); }
.login-btn { width: 100%; padding: 12px; background: #2c3e50; color: #fff; border: none; border-radius: 6px; font-size: 16px; font-weight: bold; cursor: pointer; margin-top: 10px; transition: background 0.3s, transform 0.1s; }
.login-btn:hover { background: #34495e; }
.login-btn:active { transform: scale(0.98); }
.login-card a { cursor: pointer; color: #2c3e50; }
.login-card a:hover { text-decoration: underline !important; }
/* ================= 顶部导航与看板 ================= */
#mainApp { display: none; }
.top-nav { 
    background-color: #2c3e50; 
    color: #fff; 
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
    padding: 12px 24px; 
    white-space: nowrap; 
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    position: relative;
    z-index: 20;
}
.nav-left { display: flex; align-items: center; }
.nav-left select { 
    padding: 6px 12px; 
    border-radius: 6px; 
    border: 1px solid rgba(255,255,255,0.2); 
    background-color: rgba(255,255,255,0.1); 
    font-weight: bold; 
    color: #fff; 
    max-width: 250px; 
    text-overflow: ellipsis; 
    outline: none; 
    cursor: pointer;
    font-size: 15px;
    transition: background 0.2s;
}
.nav-left select:hover { background-color: rgba(255,255,255,0.2); }
.nav-left select option { color: #333; }
.nav-center { 
    display: flex; 
    gap: 36px; 
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}
.nav-center a { 
    color: rgba(255,255,255,0.7); 
    text-decoration: none; 
    padding: 6px 12px; 
    border-radius: 4px; 
    font-size: 16px; 
    font-weight: normal; 
    transition: all 0.2s; 
}
.nav-center a:hover { background: rgba(255,255,255,0.1); color: #fff; }
.nav-center a.active { 
    color: #fff;
    font-weight: bold;
    background: rgba(255,255,255,0.15);
}
.nav-right { display: flex; align-items: center; gap: 16px; font-size: 14px; }
.user-manage-wrap { position: relative; }
.user-manage-btn { background: rgba(255,255,255,0.15); padding: 6px 14px; border-radius: 20px; color: #fff; font-size: 13px; display: flex; align-items: center; gap: 4px; cursor: pointer; transition: background 0.2s; position: relative; }
.user-manage-btn:hover { background: rgba(255,255,255,0.25); }
.admin-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background-color: #ff4d4f;
    color: #fff;
    font-size: 11px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.manage-dropdown { display: none; position: absolute; right: 0; top: 40px; background: #fff; border-radius: 6px; box-shadow: 0 4px 12px rgba(0,0,0,0.15); width: 120px; z-index: 1001; overflow: hidden; border: 1px solid #ebeef5;}
.manage-dropdown div { padding: 10px 15px; text-align: center; font-size: 13px; color: #333; cursor: pointer; border-bottom: 1px solid #f0f0f0; }
.manage-dropdown div:last-child { border-bottom: none; color: #ff4d4f; }
.manage-dropdown div:hover { background: #f5f5f5; }
.dashboard-bar { padding: 16px 24px; background-color: transparent; position: relative; z-index: 10; }
.dashboard-card {
    background: #fff;
    border: 1px solid #ebeef5;
    border-radius: 10px;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 12px 0 rgba(0,0,0,0.05);
}
.balance-left { text-align: left; }
.balance-left .lab { font-size: 13px; color: #888; margin-bottom: 4px; letter-spacing: 1px; }
.balance-left .val { font-size: 32px; font-weight: bold; color: #303133; font-family: "DIN Alternate", monospace, sans-serif; }
.balance-right { display: flex; align-items: center; gap: 30px; }
.stat-item { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.stat-label { font-size: 13px; color: #888; }
.stat-value { font-size: 18px; font-weight: bold; font-family: "DIN Alternate", monospace, sans-serif; }
.stat-value.income { color: #67c23a; }
.stat-value.expense { color: #f56c6c; }
.divider { width: 1px; height: 30px; background-color: #ebeef5; }
.wrap { padding: 16px 24px; }
.page { display: none; }
.page.active { display: block; min-height: calc(100vh - 160px); }
.page-header { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; font-size: 14px; color: #606266; }
.filter-btn { cursor: pointer; padding: 4px 12px; border-radius: 4px; transition: 0.2s; }
.filter-btn.active { background: #2c3e50; color: #fff; font-weight: bold; }
.content-row { 
    display: grid; 
    grid-template-columns: 75% 25%; 
    gap: 16px; 
    background: #fff; 
    padding: 20px; 
    border-radius: 10px; 
    height: calc(100vh - 260px); 
    min-height: 500px; 
    box-shadow: 0 2px 12px 0 rgba(0,0,0,0.05);
}
#chartDom { width: 100%; height: 100%; }
.legend-list { overflow-y: auto; padding-left: 12px; max-height: 100%; border-left: 1px solid #ebeef5; }
.legend-item { display: flex; justify-content: space-between; padding: 8px 0; font-size: 13px; border-bottom: 1px dashed #ebeef5; }
.legend-color { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 8px; }
/* ================= 全屏页面统一背景色 ================= */
#page-report {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100vh !important;
    z-index: 2000 !important;
    background: #f0f2f5;
    display: none;
    flex-direction: column;
}
#page-report.active { display: flex !important; }
.full-page { position: fixed; top: 0; left: 0; width: 100%; height: 100vh; background: #f0f2f5; z-index: 10001; display: none; flex-direction: column; }
.full-page.active { display: flex; }
/* 头部和首页导航同色 */
.full-page-header { 
    background-color: #2c3e50; 
    padding: 16px 24px; 
    border-bottom: none; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    color: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
/* 深色背景上的按钮特殊处理 */
.btn-on-dark {
    background: #fff !important;
    color: #2c3e50 !important;
    border: none;
    font-weight: bold;
}
.btn-on-dark:hover {
    background: #f5f7fa !important;
}
.close-btn-x { cursor: pointer; color: rgba(255,255,255,0.6); font-size: 22px; line-height: 1; padding: 0 10px; transition: color 0.2s; }
.close-btn-x:hover { color: #fff; }
.full-page-content { flex: 1; overflow-y: auto; padding: 0 20px 20px 20px !important; }
.card { background: #fff; padding: 24px; border-radius: 8px; display: flex; flex-direction: column; }
.form-item { margin-bottom: 16px; }
label { display: block; margin-bottom: 6px; font-size: 14px; color: #606266; }
input, select, textarea { width: 100%; padding: 10px; border: 1px solid #dcdfe6; border-radius: 6px; outline: none; font-size: 14px; transition: border 0.2s; color: #303133;}
input:focus, select:focus, textarea:focus { border-color: #2c3e50; box-shadow: 0 0 0 3px rgba(44, 62, 80, 0.1); }
/* 全局主按钮统一切换为深蓝色 */
button { padding: 10px 18px; background: #2c3e50; color: #fff; font-weight: bold; border: none; border-radius: 6px; cursor: pointer; transition: background 0.2s; }
button:hover { background: #34495e; }
button:disabled { background: #f5f7fa; color: #c0c4cc; cursor: not-allowed; border: 1px solid #e4e7ed; }
.report-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
#billTableWrap { height: auto !important; overflow-y: visible !important; border-radius: 6px; border: 1px solid #ebeef5; background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,0.02); margin-top: 15px; margin-bottom: 20px; }
.report-table { width: 100%; border-collapse: separate; border-spacing: 0; background: #fff; font-size: 13px; }
.report-table th, .report-table td { border-right: 1px solid #ebeef5; border-bottom: 1px solid #ebeef5; padding: 12px 8px; text-align: center; }
.report-table th:first-child, .report-table td:first-child { border-left: 1px solid #ebeef5; }
.report-table th { background: #f5f7fa !important; color: #606266 !important; position: sticky !important; top: 0 !important; z-index: 9999 !important; font-weight: bold; border-top: 1px solid #ebeef5; transform: translateZ(100px); box-shadow: 0 2px 4px rgba(0,0,0,0.02); }
.report-table tr:nth-child(even) { background: #fafafa; }
.report-table tr:hover { background: #f0f7ff; }
.setting-list { display: flex; flex-direction: column; gap: 12px; max-width: 800px; margin: 20px auto; }
.setting-item { display: flex; align-items: center; padding: 16px 20px; background: #fff; border-radius: 8px; box-shadow: 0 2px 12px rgba(0,0,0,0.03); cursor: pointer; transition: background 0.2s, transform 0.1s; border: 1px solid #ebeef5;}
.setting-item:hover { background: #f5f7fa; border-color: #c0c4cc; }
.setting-item:active { transform: scale(0.995); }
.setting-title { flex: 1; font-size: 15px; color: #303133; font-weight: 500;}
.setting-value { font-size: 14px; color: #909399; margin-right: 12px; }
.setting-arrow { color: #c0c4cc; font-size: 18px; font-family: consolas, monospace; line-height: 1; }
.overlay { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: rgba(0,0,0,0.5); display: none; align-items: center; justify-content: center; z-index: 10000; backdrop-filter: blur(2px); }
.overlay.active { display: flex; }
.modal { background: #fff; border-radius: 10px; width: 500px; box-shadow: 0 10px 30px rgba(0,0,0,0.2); display: flex; flex-direction: column; overflow: hidden; margin: auto; }
.modal-header { padding: 16px 24px; border-bottom: 1px solid #ebeef5; font-weight: bold; font-size: 16px; display: flex; justify-content: space-between; align-items: center; background: #fafafa; color: #303133;}
.modal-close { cursor: pointer; color: #909399; font-size: 20px; line-height: 1; }
.modal-close:hover { color: #333; }
.modal-body { padding: 24px; max-height: 70vh; overflow-y: auto; }
.modal-footer { padding: 16px 24px; border-top: 1px solid #ebeef5; display: flex; justify-content: flex-end; gap: 12px; background: #fafafa;}
.btn-default { background: #fff; color: #606266; border: 1px solid #dcdfe6; }
.btn-default:hover { background: #f5f7fa; color: #2c3e50; border-color: #b0c4de; }
.btn-primary { background: #2c3e50; color: #fff; font-weight: bold; }
.btn-primary:hover { background: #34495e; }
.auth-form-group { margin-bottom: 16px; text-align: left; }
.auth-form-group label { display: block; margin-bottom: 8px; font-size: 14px; color: #606266; font-weight: 500;}
.auth-form-group input { width: 100%; padding: 10px; border: 1px solid #dcdfe6; border-radius: 6px; font-size: 14px; outline: none; transition: 0.2s;}
.auth-form-group input:focus { border-color: #2c3e50; box-shadow: 0 0 0 3px rgba(44, 62, 80, 0.1); }
.list-item { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid #ebeef5; font-size: 14px; }
.list-item:last-child { border-bottom: none; }
.project-item { display: flex; align-items: center; padding: 10px 0; border-bottom: 1px solid #ebeef5; }
.project-item input[type="checkbox"] { margin-right: 10px; width: auto; accent-color: #2c3e50; }
.project-item span { flex: 1; font-size: 14px; }
.back-btn { cursor: pointer; display: flex; align-items: center; gap: 4px; color: #333; font-weight: bold; font-size: 16px; }
.correction-table { width: 100%; border-collapse: separate; border-spacing: 0; background: #fff; font-size: 13px; margin-top: 15px; box-shadow: 0 2px 12px rgba(0,0,0,0.05); }
.correction-table th:first-child { border-top-left-radius: 8px; }
.correction-table th:last-child { border-top-right-radius: 8px; }
.correction-table tr:last-child td:first-child { border-bottom-left-radius: 8px; }
.correction-table tr:last-child td:last-child { border-bottom-right-radius: 8px; }
.correction-table th, .correction-table td { padding: 12px; border-bottom: 1px solid #ebeef5; border-right: 1px solid #ebeef5; text-align: left; }
.correction-table th:first-child, .correction-table td:first-child { border-left: 1px solid #ebeef5; }
.correction-table thead th { background-color: #f5f7fa !important; color: #606266 !important; font-weight: bold; position: sticky !important; top: 0 !important; z-index: 9999 !important; border-top: 1px solid #ebeef5; transform: translateZ(100px); box-shadow: 0 2px 4px rgba(0,0,0,0.02); }
.correction-table td.text-blue { color: #2c3e50 !important; font-weight: bold;}
.correction-table td.text-red { color: #f56c6c !important; font-weight: bold;}
.action-link { color: #2c3e50; font-weight: bold; cursor: pointer; margin-right: 12px; text-decoration: none; }
.action-link:hover { text-decoration: underline; }
.log-list { background: #fff; border-radius: 8px; box-shadow: 0 2px 12px rgba(0,0,0,0.05); margin-top: 15px;}
.log-item { padding: 16px 20px; border-bottom: 1px solid #ebeef5; display: flex; flex-direction: column; gap: 8px; }
.log-item:last-child { border-bottom: none; }
.log-top { display: flex; justify-content: space-between; font-size: 14px; color: #606266; }
.log-title { font-weight: bold; color: #303133; font-size: 15px; }
.log-amount { font-size: 16px; font-weight: bold; color: #67c23a; margin-top: 4px; }
.log-amount.out { color: #f56c6c; }
.log-bottom { display: flex; justify-content: space-between; font-size: 12px; color: #909399; }
.book-form-item { margin-bottom: 20px; }
.book-form-item label { font-size: 15px; font-weight: bold; margin-bottom: 10px; display: block; }
.field-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; border: 1px solid #ebeef5; padding: 15px; background: #fafafa; border-radius: 8px;}
.field-grid label { font-weight: normal; display: flex; align-items: center; gap: 8px; cursor: pointer; }
.field-grid input[type="checkbox"] { width: auto; accent-color: #2c3e50; }
.user-manage-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #ebeef5;
    transition: background 0.2s;
}
.user-manage-item:hover { background: #f5f7fa; }
.user-manage-item:last-child { border-bottom: none; }
.user-info-left { cursor: pointer; display: flex; flex-direction: column; gap: 4px;}
.user-name { font-weight: bold; font-size: 15px; color: #303133; transition: color 0.2s;}
.user-name:hover { color: #2c3e50; text-decoration: underline;}
.user-time { font-size: 12px; color: #909399; }
.user-actions { 
    display: flex; 
    gap: 8px; 
    align-items: center;
    justify-content: flex-end; 
}
.btn-action {
    padding: 4px 12px;
    font-size: 13px;
    border-radius: 4px;
    cursor: pointer;
    background: transparent;
    font-weight: normal;
    transition: all 0.2s;
    outline: none;
}
.btn-delete { color: #f56c6c; border: 1px solid #fbc4c4; }
.btn-delete:hover { background: #fef0f0; border-color: #f56c6c; }
.btn-reset { color: #67c23a; border: 1px solid #c2e7b0; }
.btn-reset:hover { background: #f0f9eb; border-color: #67c23a; }
.btn-disable { color: #606266; border: 1px solid #dcdfe6; }
.btn-disable:hover { background: #f4f4f5; border-color: #909399; }
.btn-approve { color: #2c3e50; border: 1px solid #b0c4de; }
.btn-approve:hover { background: #f0f4f8; border-color: #2c3e50; }
.btn-reject { color: #f56c6c; border: 1px solid #fbc4c4; }
.btn-reject:hover { background: #fef0f0; border-color: #f56c6c; }
.detail-item { display: flex; padding: 10px 0; border-bottom: 1px dashed #ebeef5; font-size: 14px; }
.detail-label { color: #909399; width: 80px; font-weight: 500; }
.detail-item span:last-child { color: #303133; font-weight: bold; word-break: break-all; }
@media (max-width: 900px) {
    .content-row { grid-template-columns: 1fr; height: auto; }
    #chartDom { height: 360px; }
    /* 手机端适配：顶部导航按钮不再隐藏，换行到第二行居中显示 */
    .top-nav { flex-wrap: wrap; padding: 10px 12px; gap: 6px 10px; }
    .nav-left select { max-width: 170px; font-size: 14px; }
    .nav-right { font-size: 13px; gap: 8px; }
    .nav-center { display: flex; position: static; transform: none; order: 3; width: 100%; justify-content: center; gap: 8px; padding: 4px 0 0; }
    .nav-center a { font-size: 14px; padding: 6px 10px; }
    /* 手机端适配：顶部统计栏换行排布，避免金额/标签截断 */
    .dashboard-bar { padding: 10px 12px; }
    .dashboard-card { padding: 14px 16px; flex-wrap: wrap; gap: 10px 16px; }
    .balance-left .val { font-size: 24px; }
    .balance-right { gap: 16px; flex-wrap: wrap; }
    .stat-item { align-items: flex-start; }
    .stat-value { font-size: 15px; }
    .divider { height: 24px; }
}
