/* ========== 回款排查系统 样式?========== */

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
    background: #f0f2f5;
    color: #2c3e50;
    font-size: 15px;
    line-height: 1.6;
}

/* 顶部导航 */
.topbar {
    background: #2c3e50;
    color: #fff;
    padding: 0 24px;
    height: 50px;
    line-height: 50px;
}
.topbar-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
}
.logo { font-size: 18px; font-weight: bold; letter-spacing: 1px; }
.nav a { color: #bdc3c7; text-decoration: none; margin: 0 8px; font-size: 13px; }
.nav a:hover { color: #fff; }
.userinfo { font-size: 13px; color: #bdc3c7; }
.userinfo a { color: #ecf0f1; text-decoration: none; }
.userinfo a:hover { text-decoration: underline; }

/* 容器 */
.container {
    max-width: none;
    margin: 24px 32px;
    padding: 0;
}

/* 侧边?*/
.has-sidebar {
    display: grid;
    grid-template-columns: 200px 1fr;
    grid-template-rows: 50px 1fr;
    min-height: 100vh;
}
.has-sidebar .topbar {
    grid-column: 1 / -1;
}
.has-sidebar .sidebar {
    grid-row: 2;
}
.has-sidebar .container {
    grid-row: 2;
    grid-column: 2;
    margin: 24px;
}
.sidebar {
    background: #2c3e50;
    color: #ecf0f1;
    padding: 20px 0;
}
.sidebar-title {
    font-size: 13px;
    color: #7f8c8d;
    padding: 8px 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}
.sidebar-item {
    display: block;
    padding: 10px 20px;
    color: #bdc3c7;
    text-decoration: none;
    font-size: 14px;
    transition: background 0.2s, color 0.2s;
}
.sidebar-item:hover {
    background: #34495e;
    color: #ecf0f1;
}
.sidebar-item.active {
    background: #3498db;
    color: #fff;
}

/* 卡片 */
.card {
    background: #fff;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.card h3 { margin-bottom: 16px; color: #2c3e50; font-size: 17px; }

h2 {
    font-size: 22px;
    color: #2c3e50;
    margin-bottom: 16px;
}
h3 {
    font-size: 17px;
    color: #2c3e50;
}

/* 统计卡片?*/
.stats-row {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.stat-card {
    flex: 1;
    min-width: 120px;
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100px;
}
.stat-num { font-size: 24px; font-weight: bold; color: #2c3e50; white-space: nowrap; }
.stat-label { font-size: 12px; color: #7f8c8d; margin-top: 8px; }

/* 回款预算达成情况 ?统一表格 */
.budget-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    font-size: 14px;
    margin-bottom: 20px;
}
.budget-table th {
    background: #fff;
    padding: 10px 8px;
    text-align: center;
    border-bottom: 2px solid #d8d8d8;
    font-weight: 600;
    color: #2c3e50;
}
/* 7列等宽均匀分布 */
.budget-table th:nth-child(1) { width: 14.28%; }
.budget-table th:nth-child(2) { width: 14.28%; }
.budget-table th:nth-child(3) { width: 14.28%; }
.budget-table th:nth-child(4) { width: 14.28%; }
.budget-table th:nth-child(5) { width: 14.28%; }
.budget-table th:nth-child(6) { width: 14.28%; }
.budget-table th:nth-child(7) { width: 14.28%; }
.budget-table td {
    background: #fff;
    padding: 8px;
    border-bottom: 1px solid #e9ecef;
    vertical-align: middle;
    text-align: center;
}
.budget-table .num {
    text-align: center;
    font-variant-numeric: tabular-nums;
}
.budget-table .group-label {
    background: #fff;
    color: #2c3e50;
    border: none;
    border-radius: 0;
    text-align: center;
    font-weight: bold;
    font-size: 14px;
    vertical-align: middle;
}
.budget-table tbody tr:nth-child(even) td {
    background: #fff;
}
.budget-table .total-row td {
    background: #fff !important;
    border-top: 1px solid #d8d8d8;
    border-bottom: 1px solid #d8d8d8;
    font-weight: bold;
}

/* 表格 */
.table-wrap { overflow-x: auto; }
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    white-space: nowrap;
}
.data-table th {
    background: #f8f9fa;
    padding: 10px 8px;
    text-align: center;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    color: #495057;
}
.data-table td {
    padding: 8px;
    border-bottom: 1px solid #e9ecef;
    vertical-align: middle;
    text-align: center;
}
.data-table tbody tr:nth-child(odd) td { background: #fff; }
.data-table tbody tr:nth-child(even) td { background: #f8f9fa; }
.data-table tr:hover td { background: #f0f2f5 !important; }
.data-table .num { text-align: center; font-variant-numeric: tabular-nums; }

/* 可编辑单元格 */
.editable-cell { cursor: pointer; position: relative; }
.editable-cell:hover { background: #e8f4fd !important; outline: 2px solid #3498db; outline-offset: -2px; }
.editable-cell[disabled] { cursor: not-allowed; opacity: 0.7; }
.editable-cell[disabled]:hover { background: inherit !important; outline: none; }
.placeholder { color: #bdc3c7; font-style: italic; }

/* 标签 */
.tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 500;
}
.tag-exception { background: #fdebd0; color: #e67e22; }
.tag-ai, .tag-ak { background: #d5f5e3; color: #27ae60; }

/* 按钮 */
button, .btn-primary, .btn-warn {
    padding: 8px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-family: inherit;
}
.btn-primary { background: #3498db; color: #fff; }
.btn-primary:hover { background: #2980b9; }
.btn-warn { background: #e74c3c; color: #fff; }
.btn-warn:hover { background: #c0392b; }
.btn-sm { padding: 4px 12px; font-size: 12px; border: 1px solid #ddd; border-radius: 3px; background: #fff; cursor: pointer; }
.btn-sm:hover { background: #f0f0f0; }
.btn-approve { color: #27ae60; border-color: #27ae60; }
.btn-approve:hover { background: #eafaf1; }
.btn-reject { color: #e74c3c; border-color: #e74c3c; }
.btn-reject:hover { background: #fdedec; }
.btn-cancel { background: #95a5a6; color: #fff; }
.btn-cancel:hover { background: #7f8c8d; }

/* 弹窗 */
.modal {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}
.modal-content {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    min-width: 360px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
}
.modal-content h3 { margin-bottom: 16px; }

/* 表单 */
input[type="text"], input[type="password"], input[type="file"], input[type="number"], textarea, select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
}
input[type="text"]:focus, input[type="password"]:focus, textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52,152,219,0.2);
}

/* 提示 */
.alert { padding: 12px 16px; border-radius: 4px; margin-bottom: 16px; }
.alert-success { background: #d5f5e3; border: 1px solid #27ae60; color: #1e8449; }
.alert-error { background: #fdedec; border: 1px solid #e74c3c; color: #c0392b; }
.alert-card { border: 2px solid #f39c12; }
.hint { color: #7f8c8d; font-size: 12px; margin-top: 4px; }
pre { background: #2c3e50; color: #ecf0f1; padding: 16px; border-radius: 4px; overflow-x: auto; font-size: 13px; }

/* 响应?*/
@media (max-width: 768px) {
    .container { padding: 0 12px; }
    .stat-card { min-width: 80px; padding: 12px; }
    .stat-num { font-size: 22px; }
}

/*  */
.budget-table tbody.group-body {
    border: 2px solid #d8d8d8;
}
.budget-table tbody.group-body + tbody.group-body {
    border-top: 2px solid #d8d8d8;
}

/* ¿ÉÊÕËõ²à±ßÀ¸ */
.sidebar-toggle {
    display: block;
    width: 100%;
    padding: 6px 0;
    background: #34495e;
    border: none;
    color: #95a5a6;
    cursor: pointer;
    font-size: 12px;
    text-align: center;
    transition: background 0.2s;
}
.sidebar-toggle:hover { background: #4a6785; color: #ecf0f1; }
.sidebar-nav { overflow: hidden; }

.sidebar-collapsed.has-sidebar { grid-template-columns: 50px 1fr; }
.sidebar-collapsed .sidebar { padding: 10px 0; }
.sidebar-collapsed .sidebar-title { display: none; }
.sidebar-collapsed .sidebar-item {
    padding: 10px 0;
    text-align: center;
    font-size: 0;
}
.sidebar-collapsed .sidebar-item::after {
    content: attr(data-short);
    font-size: 14px;
    font-weight: 600;
}
.sidebar-collapsed .sidebar-item:hover::after,
.sidebar-collapsed .sidebar-item.active::after { color: #fff; }
.sidebar-collapsed .sidebar-item.active { background: transparent; }
.sidebar-collapsed .sidebar-item.active::after { color: #3498db; }
