* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', sans-serif;
    background-color: #f5f5f5;
    color: #333;
}

.container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 头部样式 */
.header {
    background-color: #003d7a;
    color: white;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

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

.logo-icon {
    width: 32px;
    height: 32px;
}

.logo-text {
    font-size: 18px;
    font-weight: bold;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.location {
    font-size: 14px;
}

.date {
    font-size: 13px;
}

.btn-search {
    background-color: #1890ff;
    color: white;
    border: none;
    padding: 6px 16px;
    border-radius: 4px;
    cursor: pointer;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
}

.user-info .username {
    color: white;
}

.user-info .divider {
    color: rgba(255, 255, 255, 0.5);
}

.user-info .logout-link {
    color: #40a9ff;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.2s;
}

.user-info .logout-link:hover {
    color: #69c0ff;
    text-decoration: underline;
}

.phone {
    font-weight: bold;
}

/* 导航栏样式 */
.navbar {
    background-color: #004a8f;
    padding: 0 20px;
    display: flex;
    gap: 30px;
    position: fixed;
    top: 56px; /* header 高度 */
    left: 0;
    right: 0;
    z-index: 999;
}

.nav-item {
    color: white;
    text-decoration: none;
    padding: 12px 0;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
}

.nav-item:hover,
.nav-item.active {
    border-bottom-color: #1890ff;
}

/* 主容器 */
.main-container {
    display: flex;
    flex: 1;
    overflow: hidden;
    margin-top: 100px; /* header (58px) + navbar (42px) */
}

/* 侧边栏 */
.sidebar {
    width: 180px;
    background-color: #1e1e1e;
    color: white;
    padding: 15px 0;
}

.sidebar-search {
    padding: 0 15px 15px;
}

.sidebar-search input {
    width: 100%;
    padding: 8px;
    border: 1px solid #333;
    background-color: #2d2d2d;
    color: white;
    border-radius: 4px;
}

.sidebar-item {
    padding: 12px 20px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.sidebar-item:hover {
    background-color: #2d2d2d;
}

.sidebar-item.active {
    background-color: #003d7a;
    border-left: 3px solid #1890ff;
}

.sidebar-divider {
    height: 1px;
    background-color: #444;
    margin: 10px 0;
}

/* 主内容区 */
.content {
    flex: 1;
    background-color: white;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.content-header {
    background-color: #f0f0f0;
    padding: 8px 15px;
    border-bottom: 1px solid #d9d9d9;
}

.tabs {
    display: flex;
    gap: 10px;
}

.tab {
    padding: 8px 15px;
    cursor: pointer;
    background-color: transparent;
    border-radius: 4px 4px 0 0;
    transition: background-color 0.2s;
}

.tab:hover {
    background-color: #e6e6e6;
}

.tab.active {
    background-color: white;
    font-weight: 500;
}

/* 控制栏 */
.controls {
    padding: 15px 20px;
    background-color: #fafafa;
    border-bottom: 1px solid #e8e8e8;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.control-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.control-left label {
    font-size: 14px;
}

.control-left select {
    padding: 6px 10px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
}

.btn-period,
.btn-period-month,
.btn-period-year {
    padding: 6px 12px;
    border: 1px solid #d9d9d9;
    background-color: white;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
}

.btn-period:hover,
.btn-period-month:hover,
.btn-period-year:hover {
    border-color: #1890ff;
    color: #1890ff;
}

.btn-period.active,
.btn-period-month.active,
.btn-period-year.active {
    background-color: #1890ff;
    color: white;
    border-color: #1890ff;
}

.control-left input[type="date"],
.control-left input[type="month"],
.control-left input[type="number"],
.control-left select.month-select,
.control-left select.year-select {
    padding: 6px 10px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    background-color: white;
    cursor: pointer;
    font-size: 14px;
}

.control-left select.month-select {
    min-width: 80px;
}

.control-right {
    display: flex;
    gap: 10px;
}

.btn-primary {
    padding: 8px 20px;
    background-color: #1890ff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-primary:hover {
    background-color: #40a9ff;
}

.btn-secondary {
    padding: 8px 20px;
    background-color: #fff;
    color: #666;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    color: #1890ff;
    border-color: #1890ff;
}

/* 报表容器 */
.report-container {
    flex: 1;
    overflow: auto;
    padding: 20px;
}

.loading {
    text-align: center;
    padding: 100px 20px;
    color: #999;
    font-size: 16px;
}

/* 空状态占位图 */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    text-align: center;
}

.empty-icon {
    font-size: 80px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-title {
    font-size: 20px;
    font-weight: 500;
    color: #333;
    margin-bottom: 12px;
}

.empty-description {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
}

.empty-tips {
    font-size: 13px;
    color: #999;
}

.report-content {
    max-width: 1200px;
    margin: 0 auto;
}

.report-title {
    text-align: center;
    font-size: 24px;
    margin-bottom: 20px;
    color: #333;
}

.report-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    padding: 10px;
    background-color: #f9f9f9;
    border-radius: 4px;
    font-size: 13px;
    color: #666;
}

.info-right {
    display: flex;
    gap: 30px;
}

/* 报表表格 */
.report-table {
    width: 100%;
    border-collapse: collapse;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    font-size: 14px;
}

.report-table thead {
    background-color: #e8e8e8;
}

.report-table th {
    padding: 10px 8px;
    text-align: center;
    font-weight: 500;
    border: 1px solid #d9d9d9;
}

/* 日报表头对齐 */
.report-table thead tr th:first-child {
    text-align: left;
}

.report-table thead tr th:last-child {
    text-align: right;
}

/* 月报年报表头居中（覆盖上面的规则） */
.report-table.detailed-table thead tr th:first-child,
.report-table.detailed-table thead tr th:last-child {
    text-align: center;
}

.report-table td {
    padding: 8px;
    border: 1px solid #e8e8e8;
    text-align: right;
}

.report-table td:first-child {
    text-align: left;
}

/* 日报表格样式 - 项目列加粗 */
.report-table tbody tr td:first-child {
    font-weight: 500;
}

/* 月报年报表格样式 - 第一列不加粗（日期/月份） */
.report-table.detailed-table tbody tr td:first-child {
    font-weight: normal;
}

.report-table tbody tr:hover {
    background-color: #f5f5f5;
}

/* 汇总行样式 */
.report-table tr.summary-row {
    background-color: #f0f0f0;
    font-weight: 500;
}

.report-table tr.total-row {
    background-color: #e6f7ff;
    font-weight: bold;
}

/* 金额样式 */
.amount-positive {
    color: #1890ff;
}

.amount-zero {
    color: #999;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .main-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        max-height: 200px;
        overflow-y: auto;
    }
    
    .controls {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .control-left,
    .control-right {
        width: 100%;
        justify-content: space-between;
    }
}

/* 说明内容样式 */
.help-content {
    padding: 30px 40px;
    overflow-y: auto;
    height: 100%;
    background-color: #fafafa;
}

.help-title {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #1890ff;
}

.help-section {
    background-color: white;
    border-radius: 4px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #e8e8e8;
}

.help-section h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1890ff;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}

.help-item {
    padding: 12px 0;
    line-height: 1.8;
    color: #666;
    font-size: 14px;
    border-bottom: 1px dashed #f0f0f0;
}

.help-item:last-child {
    border-bottom: none;
}

.help-item strong {
    color: #333;
    font-weight: 600;
    margin-right: 8px;
}

.help-example {
    display: block;
    margin-top: 8px;
    padding: 8px 12px;
    background-color: #f5f5f5;
    border-left: 3px solid #1890ff;
    color: #666;
    font-size: 13px;
}

/* 打印样式 */
@media print {
    .header,
    .navbar,
    .sidebar,
    .content-header,
    .controls {
        display: none !important;
    }
    
    .content {
        margin: 0;
    }
    
    .report-container {
        padding: 20px;
    }
    
    .report-table {
        box-shadow: none;
    }
}

