/* L4管理工具 - 暗色系样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ==================== 登录相关样式 ==================== */
.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(26, 29, 35, 0.98);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 40px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    max-width: 400px;
    width: 90%;
}

.login-box h2 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 24px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.qrcode-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.qrcode-container {
    position: relative;
    width: 200px;
    height: 200px;
    background: white;
    border-radius: 8px;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qrcode-image {
    width: 180px;
    height: 180px;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #666;
}

.qrcode-mask {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border-radius: 8px;
}

.qrcode-mask span {
    color: white;
    font-size: 16px;
}

.qrcode-mask button {
    padding: 8px 20px;
    background: var(--accent-primary);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.qrcode-mask button:hover {
    background: var(--accent-secondary);
}

.qrcode-tip {
    color: var(--text-secondary);
    font-size: 14px;
}

.login-status {
    text-align: center;
    margin-top: 20px;
    padding: 12px;
    border-radius: 6px;
    font-size: 14px;
    min-height: 40px;
}

.login-status.pending {
    background: rgba(255, 171, 64, 0.1);
    color: var(--accent-warning);
    border: 1px solid rgba(255, 171, 64, 0.3);
}

.login-status.approved {
    background: rgba(0, 230, 118, 0.1);
    color: var(--accent-success);
    border: 1px solid rgba(0, 230, 118, 0.3);
}

.login-status.rejected {
    background: rgba(255, 82, 82, 0.1);
    color: var(--accent-danger);
    border: 1px solid rgba(255, 82, 82, 0.3);
}

.login-status.error {
    background: rgba(255, 82, 82, 0.1);
    color: var(--accent-danger);
    border: 1px solid rgba(255, 82, 82, 0.3);
}

.hidden {
    display: none !important;
}

:root {
    /* 暗色主题配色 */
    --bg-primary: #1a1d23;
    --bg-secondary: #242830;
    --bg-tertiary: #2d323b;
    --bg-card: #1e2229;
    --bg-hover: #353b47;
    
    --text-primary: #e8eaed;
    --text-secondary: #b8b9bd;
    --text-muted: #8a8d93;
    
    --border-color: #3e4452;
    --border-light: #4b5363;
    
    --accent-primary: #4a9eff;
    --accent-secondary: #00d4ff;
    --accent-success: #00e676;
    --accent-warning: #ffab40;
    --accent-danger: #ff5252;
    --accent-purple: #b388ff;
    --accent-info: #29b6f6;
    
    --gradient-primary: linear-gradient(135deg, #4a9eff 0%, #00d4ff 100%);
    --gradient-card: linear-gradient(145deg, #1e2229 0%, #252a35 100%);
    
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* 主容器 */
.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    height: 100vh;
    overflow: hidden;
}

/* 顶部导航 */
.main-header {
    display: flex;
    align-items: center;
    padding: 16px 24px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    z-index: 100;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 24px;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-logo h1 {
    font-size: 20px;
    font-weight: 600;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.version-tag {
    padding: 4px 12px;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    font-size: 12px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
}

/* 主标签页 */
.main-tabs {
    display: flex;
    align-items: center;
    gap: 8px;
}

.main-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.main-tab:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.main-tab.active {
    background: var(--gradient-primary);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 4px 12px rgba(74, 158, 255, 0.3);
}

.tab-icon {
    width: 18px;
    height: 18px;
}

/* 内容包装器 */
.content-wrapper {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* 左侧边栏 */
.sidebar {
    width: 240px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar-panel {
    display: none;
    animation: slideIn 0.3s ease;
}

.sidebar-panel.active {
    display: block;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.sidebar-title {
    padding: 20px 16px 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sidebar-nav {
    padding: 8px;
}

.sidebar-tab {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 16px;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 14px;
    text-align: left;
    cursor: pointer;
    transition: var(--transition);
}

.sidebar-tab:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.sidebar-tab.active {
    background: var(--bg-hover);
    color: var(--accent-primary);
    font-weight: 500;
}

.nav-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* 主内容区域 - 白色背景 */
.main-content {
    flex: 1;
    background: #ffffff;
    overflow-y: auto;
    padding: 24px;
}

.content-panel {
    display: none;
    animation: fadeIn 0.3s ease;
}

.content-panel.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.tab-section {
    display: none;
}

.tab-section.active {
    display: block;
    animation: sectionIn 0.3s ease;
}

@keyframes sectionIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 章节标题 - 深灰色 */
.section-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #555555;
}

/* 卡片 - 白色背景 */
.card {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.card h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #555555;
}
.overview-card h3 {
    margin-bottom: 8px;
}

/* 卡片头部带状态 */
.card-header-with-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.card-header-with-status h3 {
    margin-bottom: 0;
}

/* 上传状态指示器 */
.upload-status {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #e8f5e9;
    color: #2e7d32;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
}

.upload-status .status-icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

/* 信息文本 */
.info-text {
    color: #666666;
    font-size: 13px;
    margin-bottom: 12px;
}

/* 自动导入容器 */
.auto-import-container {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding: 15px 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 10px;
    border: 1px solid #dee2e6;
}

.auto-import-btn {
    flex-shrink: 0;
}

/* 工时统计自动导入行 */
.auto-import-row {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 10px;
}

.auto-import-row .auto-import-hint {
    color: #666;
    font-size: 13px;
}

/* 自动下载容器 */
.auto-download-container {
    margin-bottom: 20px;
    padding: 15px 20px;
    background: linear-gradient(135deg, #fff8f0 0%, #fff4e6 100%);
    border-radius: 10px;
    border: 1px solid #ffe4b5;
}

.auto-download-container h3 {
    margin: 0 0 8px 0;
    color: #d35400;
    font-size: 16px;
}

.download-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    font-size: 13px;
    border-radius: 6px;
    white-space: nowrap;
}

.download-btn .btn-icon {
    width: 16px;
    height: 16px;
}

.btn-outline-primary {
    background: white;
    border: 1px solid var(--accent-primary);
    color: var(--accent-primary);
}

.btn-outline-primary:hover {
    background: var(--accent-primary);
    color: white;
}

.auto-import-btn .btn-icon {
    width: 20px;
    height: 20px;
    margin-right: 8px;
}

.auto-import-hint {
    font-size: 13px;
    color: #666;
}

/* 伊甸园自动下载表单 */
.download-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.download-row label {
    font-size: 13px;
    color: #555;
    white-space: nowrap;
}

.download-row input {
    padding: 6px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    width: 200px;
}

.download-row input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.1);
}

.btn-sm {
    padding: 6px 16px;
    font-size: 13px;
}

.auto-download-hint {
    font-size: 13px;
    color: #666;
    margin-top: 8px;
}

/* Flatpickr 双日历样式优化 */
.flatpickr-calendar {
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange {
    background: #3498db;
    border-color: #3498db;
}

.flatpickr-day.inRange,
.flatpickr-day.selected.inRange,
.flatpickr-day.startRange.inRange,
.flatpickr-day.endRange.inRange {
    background: #e8f4fc;
    border-color: #e8f4fc;
}

.flatpickr-day.selected.startRange + .endRange:not(:nth-child(7n+1)),
.flatpickr-day.startRange.endRange {
    border-radius: 0;
}

/* 按钮组 */
.button-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* 内联按钮组 - 与输入框并排 */
.button-group-inline {
    display: inline-flex;
    gap: 8px;
    margin-left: 10px;
    vertical-align: middle;
}

.button-group-inline .btn {
    padding: 6px 16px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: var(--gradient-primary);
    color: #fff;
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-light);
}

.btn-success {
    background: var(--accent-success);
    color: #121212;
}

.btn-danger {
    background: var(--accent-danger);
    color: #fff;
}

.btn-warning {
    background: var(--accent-warning);
    color: #121212;
}

.btn-info {
    background: var(--accent-info);
    color: #fff;
}

.btn-purple {
    background: var(--accent-purple);
    color: #fff;
}

.btn-small {
    padding: 6px 12px;
    font-size: 12px;
}

/* 表单控件 - 白色背景适配 */
.form-control {
    width: 100%;
    padding: 10px 12px;
    background: #ffffff;
    border: 1px solid #d0d0d0;
    border-radius: 8px;
    color: #333333;
    font-size: 14px;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(74, 158, 255, 0.1);
}

.form-control::placeholder {
    color: #999999;
}

/* 日期范围选择器样式优化 - 一排左对齐 */
.form-row .form-group.date-range-group {
    flex-direction: row;
    align-items: center;
    flex-wrap: nowrap;
}

.form-row .form-group.date-range-group > label {
    white-space: nowrap;
    margin-right: 5px;
}

.form-row .form-group.date-range-group > .form-control {
    width: 130px;
    flex-shrink: 0;
}

/* flatpickr生成的输入框样式 */
.form-row .form-group.date-range-group input[type="text"].form-control {
    width: 200px;
    cursor: pointer;
}

/* 隐藏的原始日期输入框 */
.form-row .form-group.date-range-group input[type="date"] {
    display: none;
}

/* 内联按钮组样式 */
.form-row .form-group.date-range-group .button-group-inline {
    display: inline-flex;
    gap: 8px;
    flex-shrink: 0;
    margin-left: 10px;
}

.form-row .form-group.date-range-group .button-group-inline .btn {
    padding: 8px 16px;
}

/* 表单布局 */
.filter-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-row {
    display: flex;
    gap: 8px;
}

.form-row .form-group {
    flex: 1;
}

/* 复选框组 - 白色背景适配 */
.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    max-height: 200px;
    overflow-y: auto;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
    color: #555555;
}

.checkbox-group input[type="checkbox"] {
    accent-color: var(--accent-primary);
}

.no-data {
    color: #999999;
    font-size: 13px;
    padding: 20px;
    width: 100%;
    text-align: center;
}

/* 上传区域 - 白色背景适配 */
.upload-area {
    border: 2px dashed #d0d0d0;
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: #f8f9fa;
}

.upload-area:hover {
    border-color: var(--accent-primary);
    background: #f0f4ff;
}

.upload-area.dragover {
    border-color: var(--accent-primary);
    background: rgba(74, 158, 255, 0.1);
}

.upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.upload-icon {
    width: 48px;
    height: 48px;
    color: var(--accent-primary);
}

.upload-area p {
    color: #555555;
    font-size: 14px;
}

.upload-hint {
    color: #999999;
    font-size: 12px;
}

/* 工时数据日期范围显示 */
.data-date-range {
    text-align: center;
    padding: 8px 12px;
    margin-top: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
}

/* 文件信息 - 白色背景适配 */
.file-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-top: 12px;
}

.file-info .file-name {
    color: #333333;
    font-size: 13px;
}

/* 上传网格 */
.upload-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.upload-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* 进度条 */
.progress-bar {
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 12px;
}

.progress-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 3px;
    animation: progress 2s ease-in-out infinite;
}

@keyframes progress {
    0% { width: 0; }
    50% { width: 70%; }
    100% { width: 90%; }
}

/* 状态提示 - 白色背景适配 */
.status {
    margin-top: 12px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 13px;
    color: #555555;
}

.status.success {
    background: rgba(0, 230, 118, 0.1);
    color: var(--accent-success);
}

.status.error {
    background: rgba(255, 82, 82, 0.1);
    color: var(--accent-danger);
}

/* 工具栏 */
.toolbar {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.toolbar .form-control {
    min-width: 200px;
}

.toolbar .search-row {
    display: flex;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.toolbar .search-row .form-control {
    flex: 1;
    min-width: 0;
    width: auto;
}

.toolbar .button-row {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.filter-toolbar {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.filter-toolbar .form-control {
    min-width: 150px;
    flex: 1;
    min-width: 120px;
}

.filter-toolbar input.form-control {
    flex: 2;
    min-width: 200px;
}

/* 表格容器 */
.table-container {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

thead {
    background: #f8f9fa;
}

th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: #333333;
    white-space: nowrap;
    border-bottom: 1px solid #e0e0e0;
}

td {
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
    color: #333333;
}

tbody tr:hover {
    background: #f8f9fa;
}

.empty-row {
    text-align: center;
    color: #999999;
    padding: 40px !important;
}

.table-info {
    color: #666666;
    font-size: 13px;
    margin-top: 12px;
}

.table-info strong {
    color: var(--accent-primary);
}

/* 统计卡片 - 白色背景适配 */
.stats-card {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 24px 30px;
    margin-bottom: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    min-height: 180px;
}

.stats-card h3 {
    font-size: 16px;
    font-weight: 600;
    color: #333333;
    margin-bottom: 16px;
}


.stats-card.main-stats {
    border: 1px solid var(--accent-primary);
    box-shadow: 0 0 20px rgba(74, 158, 255, 0.15);
    margin-bottom: 20px;
}

.stats-summary {
    display: flex;
    gap: 24px;
    margin-bottom: 20px;
}

.stats-summary span {
    color: #666666;
    font-size: 13px;
}

.stats-summary strong {
    color: #333333;
    font-size: 18px;
}

.stats-count {
    font-weight: normal;
    color: #666666;
    font-size: 14px;
}

.stats-table-container {
    overflow-y: visible;
}

.stats-mini-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.stats-mini-table th {
    background: #f5f5f5;
    padding: 8px 10px;
    text-align: left;
    font-weight: 600;
    color: #333333;
    border-bottom: 1px solid #e0e0e0;
    position: sticky;
    top: 0;
}

.stats-mini-table td {
    padding: 8px 10px;
    color: #333333;
    border-bottom: 1px solid #f0f0f0;
}

.stats-mini-table tr:hover td {
    background: #f9f9f9;
}

.stats-summary .highlight {
    color: var(--accent-primary);
    font-size: 20px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
}

.stat-item {
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
    text-align: center;
}

.stat-item .stat-label {
    display: block;
    color: #666666;
    font-size: 12px;
    margin-bottom: 8px;
}

.stat-item .stat-value {
    color: #333333;
    font-size: 24px;
    font-weight: 600;
    white-space: nowrap;
}

.unit-text {
    font-size: 0.75em;
    margin-left: 2px;
    font-weight: normal;
}

.stat-item .stat-value strong.highlight {
    color: var(--accent-primary);
}

.stats-row {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 20px;
}

.stats-list {
    margin-top: 12px;
}

.stats-list .list-item {
    display: flex;
    gap: 12px;
    padding: 10px 14px;
    background: #f8f9fa;
    border-radius: 6px;
    margin-bottom: 8px;
    font-size: 14px;
    color: #333333;
    align-items: center;
}

.stats-list p {
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 6px;
    margin-bottom: 8px;
    font-size: 13px;
    color: #555555;
}

.empty-text {
    color: #999999;
    font-size: 13px;
}

.list-item {
    display: flex;
    gap: 12px;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 6px;
    margin-bottom: 8px;
    font-size: 13px;
    color: #333333;
}

.item-name {
    flex: 1;
    color: #333333;
}

.item-date {
    color: #333333;
}

.item-stage {
    color: #333333;
}

.item-payment {
    color: #333333;
    font-weight: 500;
}

/* 字段映射 - 白色背景适配 */
.field-mapping table {
    margin-bottom: 20px;
}

.field-mapping h4 {
    font-size: 14px;
    font-weight: 600;
    color: #333333;
    margin-bottom: 12px;
}

.other-fields h4 {
    font-size: 14px;
    font-weight: 600;
    color: #333333;
    margin-bottom: 12px;
}

.other-fields ul {
    list-style: none;
    padding: 0;
}

.other-fields li {
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 6px;
    margin-bottom: 8px;
    font-size: 13px;
    color: #555555;
}

.other-fields li::before {
    content: "•";
    color: var(--accent-primary);
    margin-right: 8px;
}

/* Toast 提示 */
#toastContainer {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 1000;
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 12px;
    box-shadow: var(--shadow-lg);
    animation: toastIn 0.3s ease;
    max-width: 400px;
}

.toast.success {
    border-color: var(--accent-success);
}

.toast.error {
    border-color: var(--accent-danger);
}

.toast.warning {
    border-color: var(--accent-warning);
}

.toast.info {
    border-color: var(--accent-info);
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes toastOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100px);
    }
}

/* 底部 */
.footer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 24px;
    padding: 16px 24px;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 12px;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f0f0f0;
}

::-webkit-scrollbar-thumb {
    background: #c0c0c0;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a0a0a0;
}

/* 筛选区域样式 - 项目统计页面 */
.filter-section {
    margin-bottom: 25px;
}

.page-content {
    padding: 20px;
}

/* 敬请期待样式 */
.coming-soon-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    text-align: center;
}

.coming-soon-icon {
    width: 80px;
    height: 80px;
    margin-bottom: 20px;
    color: #ffc107;
}

.coming-soon-icon svg {
    width: 100%;
    height: 100%;
}

.coming-soon-text {
    font-size: 18px;
    color: #666;
    font-weight: 500;
}

.page-title {
    font-size: 22px;
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #4472C4;
}

.filter-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.filter-group label {
    font-size: 13px;
    color: #666;
    font-weight: 500;
}

.filter-group input,
.filter-group select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    min-width: 160px;
}

.filter-group input:focus,
.filter-group select:focus {
    outline: none;
    border-color: #4472C4;
    box-shadow: 0 0 0 3px rgba(68, 114, 196, 0.1);
}

.export-section {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 12px 15px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #dee2e6;
}

.table-section {
    overflow-x: auto;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .sidebar {
        width: 200px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .main-header {
        flex-direction: column;
        gap: 16px;
    }
    
    .content-wrapper {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        max-height: 200px;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
    
    .main-content {
        padding: 16px;
    }
    
    .form-row {
        flex-direction: column;
    }
    
    .stats-row {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .upload-grid {
        grid-template-columns: 1fr;
    }
    
    .filter-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-toolbar .form-control {
        min-width: 100%;
    }
}

/* 工作内容列样式 - 防止换行，超出显示省略号 */
.content-cell {
    max-width: 300px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: help;
}

.content-cell:hover {
    color: var(--accent-primary);
}

/* 预算制定模块样式 */
.budget-row {
    transition: var(--transition);
}

.material-select-btn {
    margin-top: 4px;
    font-size: 11px;
}

.amount-display,
.tax-excluded-display,
.after-tax-display {
    display: inline-block;
    min-width: 60px;
    text-align: right;
    padding: 6px;
    background: #f8f9fa;
    border-radius: 4px;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.summary-item {
    display: flex;
    gap: 8px;
    align-items: center;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 14px;
}

.summary-item strong {
    color: var(--accent-primary);
    font-size: 18px;
    font-weight: 600;
}

/* 弹窗样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    animation: modalIn 0.3s ease;
}

.modal.show {
    display: flex;
}

@keyframes modalIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    margin: 0;
    color: var(--text-primary);
}

.modal-close {
    font-size: 28px;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1;
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--accent-danger);
}

.modal-body {
    padding: 20px;
}

.modal-body .form-group {
    margin-bottom: 16px;
}

.modal-body .form-control {
    background: var(--bg-primary);
    border-color: var(--border-color);
    color: var(--text-primary);
}

.required {
    color: var(--accent-danger);
}

/* 预算制定表格特殊样式 */
#bd-budgetTable {
    font-size: 14px;
}

#bd-budgetTable th,
#bd-budgetTable td {
    padding: 8px 12px;
}

#bd-budgetTable .form-control {
    padding: 6px 8px;
    font-size: 14px;
}

/* 物料选择表格 */
#bd-materialSelectTable {
    max-height: 400px;
}

#bd-materialSelectBody {
    max-height: 350px;
    overflow-y: auto;
}

/* 预算制定 - 三段式表格样式 */
.budget-table {
    font-size: 14px;
    border: 1px solid #e0e0e0;
}

.budget-table th,
.budget-table td {
    padding: 8px 12px;
    border: 1px solid #e0e0e0;
}

/* 蓝色表头 - 物料预算和汇总 */
.header-blue {
    background: #4472C4 !important;
    color: #ffffff !important;
}

.header-blue th {
    color: #ffffff;
    border-color: #365c9e;
}

/* 黄色表头 - 人工成本和差旅成本 */
.header-yellow {
    background: #FFC000 !important;
    color: #000000 !important;
}

.header-yellow th {
    color: #000000;
    border-color: #d4a000;
}

/* 物料预算表格 */
.material-budget input[type="number"],
.material-budget input[type="text"] {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    font-size: 12px;
    background: #ffffff;
}

/* 人工成本表格 */
.labor-budget input[type="number"],
.labor-budget input[type="text"] {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    font-size: 14px;
    background: #ffffff;
}

/* 人工成本表格第6列(下单金额)和第9列(交付总额)数字样式 */
#bd-salesTable tbody tr td:nth-child(6),
#bd-salesTable tbody tr td:nth-child(9) {
    font-size: 20px !important;
    font-weight: bold !important;
}

/* 人工成本表格最后一行(汇总行)的第6列和第9列 */
#bd-salesTable #bd-salesFoot .summary-row td:nth-child(6),
#bd-salesTable #bd-salesFoot .summary-row td:nth-child(9),
#bd-salesTotal,
#bd-deliveryTotal {
    font-size: 20px !important;
    font-weight: bold !important;
}

/* 直接成本表格最后一列(金额)数字样式 */
#bd-costDetailTable tbody tr td:last-child {
    font-size: 20px !important;
    font-weight: bold !important;
}

/* 直接成本表格最后一行(汇总行)的最后一列 */
#bd-costDetailTable tfoot tr:last-child td:last-child {
    font-size: 20px !important;
    font-weight: bold !important;
}

/* 差旅成本表格 */
.travel-budget input[type="number"],
.travel-budget input[type="text"],
.travel-budget select {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    font-size: 14px;
    background: #ffffff;
}

/* 汇总表格 */
.summary-table {
    margin-top: 20px;
}

.summary-table td {
    font-size: 14px;
    font-weight: 500;
    text-align: center;
}

.highlight-red {
    color: #ff0000;
    font-weight: bold;
    font-size: 14px;
}
.highlight-bright-orange { color: #ff6d00; font-weight: bold; }
.highlight-bright-pink { color: #e91e63; font-weight: bold; }
.highlight-purple { color: #9c27b0; font-weight: bold; }

/* 只读字段样式 */
input[readonly] {
    background-color: #f5f5f5;
    cursor: not-allowed;
}

/* 自动计算的显示字段 */
.calculated-field {
    display: inline-block;
    min-width: 80px;
    padding: 6px 8px;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 14px;
    text-align: right;
}

.budget-table .calculated-field {
    min-width: 70px;
    font-weight: 500;
}


/* 客户联想下拉 */
.autocomplete-dropdown .suggestion-item {
    padding: 9px 14px;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    border-bottom: 1px solid #f0f0f0;
}
.autocomplete-dropdown .suggestion-item:last-child { border-bottom: none; }
.autocomplete-dropdown .suggestion-item:hover,
.autocomplete-dropdown .suggestion-item.active {
    background: #e3f0ff;
    color: #1a73e8;
}
.autocomplete-dropdown .no-result {
    padding: 10px 14px;
    color: #999;
    font-size: 13px;
    text-align: center;
}

/* 预算概览网格 */
.overview-card .overview-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    padding: 8px 0;
}
.overview-item {
    text-align: center;
}
.overview-label {
    font-size: 14px;
    color: #333;
    margin-bottom: 4px;
    font-weight: 500;
}
/* 预算概览卡片数值 */
.overview-card .overview-value {
    font-size: 24px;
    font-weight: 600;
    line-height: 1.2;
}
.overview-value.center {
    text-align: center;
}
.overview-value.left {
    text-align: left;
}
.overview-value.right {
    text-align: right;
}
.overview-input-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
}
.overview-input {
    width: 80px;
    font-size: 20px;
    font-weight: bold;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 4px 8px;
    color: #333;
}
.overview-unit {
    font-size: 18px;
    color: #666;
    margin-left: 4px;
}
.highlight-blue { color: #1a73e8; }
.highlight-green { color: #34a853; }
.highlight-red { color: #ff5252; }
.highlight-purple { color: #b388ff; }

/* 强制修改概览卡片字体大小 */
#bd-overview-total,
#bd-overview-total-no-tax,
#bd-overview-budget,
#bd-overview-remain,
#bd-overview-profit,
#bd-overview-profit-rate,
#bd-overview-tax-amount {
    font-size: 32px !important;
    font-weight: 600 !important;
}

/* ==================== 免责声明弹窗 ==================== */
.disclaimer-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.disclaimer-modal.show {
    opacity: 1;
    visibility: visible;
}

.disclaimer-content {
    background: white;
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    padding: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
}

.disclaimer-content h2 {
    text-align: center;
    color: #333;
    margin-bottom: 20px;
    font-size: 22px;
    font-weight: 600;
}

.disclaimer-text {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 20px;
    padding-right: 10px;
}

.disclaimer-text p {
    margin-bottom: 12px;
    line-height: 1.8;
    color: #555;
    font-size: 14px;
    text-align: justify;
}

.disclaimer-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.disclaimer-actions .btn {
    padding: 12px 30px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.disclaimer-actions .btn-primary {
    background: #4a90e2;
    color: white;
}

.disclaimer-actions .btn-primary:hover {
    background: #357abd;
}

.disclaimer-actions .btn-secondary {
    background: #f0f0f0;
    color: #666;
}

.disclaimer-actions .btn-secondary:hover {
    background: #e0e0e0;
}

/* ==================== 预算概览字体修复 ==================== */
/* 强制修复预算概览卡片字体大小 - 还原到合适大小 */
#bd-overview-total,
#bd-overview-total-no-tax,
#bd-overview-budget,
#bd-overview-remain {
    font-size: 30px !important;
    font-weight: 600 !important;
    display: block !important;
    line-height: 1.2 !important;
}

/* 确保highlight颜色类不覆盖字体大小 */
.highlight-red,
.highlight-purple,
.highlight-blue,
.highlight-green {
    font-size: inherit !important;
    font-weight: inherit !important;
}

/* 强制放大概览卡片标签字体 */
.overview-card .overview-label {
    font-size: 16px !important;
    font-weight: 500 !important;
    color: #333 !important;
}
