/* /www/wwwroot/xiafa.gbwemb.site/assets/css/style.css */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
}

body {
    background: #f5f9ff;
    padding: 20px;
    min-height: 100vh;
}

.container {
    max-width: 1440px;
    margin: 0 auto;
    background: white;
    border-radius: 16px;
    border: 1px solid #b8d1f0;
    box-shadow: 0 4px 12px rgba(0,102,204,0.05);
    padding: 24px;
}

h1 {
    color: #0b2c4a;
    font-size: 24px;
    font-weight: 600;
    margin: 0;
}

h2 {
    color: #0b2c4a;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
}

h3 {
    color: #0b2c4a;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
}

/* 头部操作栏 */
.header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.button-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    background: white;
    border: 1px solid #0066cc;
    color: #0066cc;
    cursor: pointer;
    transition: all 0.2s ease;
    line-height: 1.4;
    text-align: center;
}

.btn:hover {
    background: #0066cc;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,102,204,0.2);
}

.btn-danger {
    border-color: #dc3545;
    color: #dc3545;
}

.btn-danger:hover {
    background: #dc3545;
    color: white;
}

.btn-success {
    background: #0066cc;
    color: white;
    border: none;
}

.btn-success:hover {
    background: #0052a3;
}

/* 表格样式 */
.table-wrapper {
    overflow-x: auto;
    margin: 20px 0;
    border-radius: 12px;
    border: 1px solid #d9e6f2;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    font-size: 14px;
}

th {
    background: #e6f0fa;
    color: #0b2c4a;
    font-weight: 600;
    font-size: 14px;
    padding: 14px 12px;
    text-align: center;
    border-bottom: 2px solid #b8d1f0;
    white-space: nowrap;
}

td {
    padding: 12px;
    border-bottom: 1px solid #d9e6f2;
    text-align: center;
    vertical-align: middle;
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background-color: #f0f7ff;
}

/* 金额样式 */
.amount {
    font-family: 'SF Mono', 'Courier New', monospace;
    font-weight: 600;
    font-size: 15px;
    white-space: nowrap;
}

.amount-income {
    color: #0b7e4b;
}

.amount-expense {
    color: #b3403a;
}

/* 徽章样式 */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 500;
    background: #e6f7e6;
    color: #2e7d32;
    white-space: nowrap;
}

.badge.expense {
    background: #fee7e7;
    color: #b3403a;
}

/* 状态按钮和徽章 */
.status-col {
    text-align: center;
    min-width: 70px;
}

.status-btn {
    display: inline-block;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 20px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.status-unread {
    background: #fee7e7;
    color: #b3403a;
    border: 1px solid #f5c6cb;
}

.status-unread:hover {
    background: #f5c6cb;
    color: #b3403a;
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 20px;
    white-space: nowrap;
}

.status-read {
    background: #e6f7e6;
    color: #0b7e4b;
}

/* 订单号等宽 */
.order-no {
    font-family: 'SF Mono', 'Courier New', monospace;
    font-size: 13px;
    color: #0b4f6c;
    word-break: break-all;
    max-width: 200px;
}

.appid-col {
    font-family: 'SF Mono', 'Courier New', monospace;
    font-size: 13px;
    color: #5a6c7a;
    white-space: nowrap;
}

.company-name {
    font-weight: 500;
    color: #0b2c4a;
    white-space: nowrap;
}

.time-col {
    font-family: 'SF Mono', 'Courier New', monospace;
    font-size: 13px;
    color: #4b5e6b;
    white-space: nowrap;
}

.memo {
    color: #6f7d8a;
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 统计卡片 */
.stats-card {
    background: #e6f0fa;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
    display: flex;
    gap: 30px;
    justify-content: space-around;
    text-align: center;
    border: 1px solid #b8d1f0;
}

.stat-item {
    flex: 1;
}

.stat-label {
    color: #0b2c4a;
    font-size: 14px;
    margin-bottom: 8px;
    font-weight: 500;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    font-family: 'SF Mono', monospace;
    line-height: 1.2;
}

.stat-value.income {
    color: #0b7e4b;
}

.stat-value.expense {
    color: #b3403a;
}

/* 分页样式 */
.pagination {
    margin-top: 28px;
    display: flex;
    gap: 8px;
    justify-content: center;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid #d9e6f2;
    flex-wrap: wrap;
}

.page-link {
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    color: #0066cc;
    border: 1px solid #d9e6f2;
    font-size: 14px;
    background: white;
    transition: all 0.2s ease;
}

.page-link:hover {
    background: #e6f0fa;
    border-color: #0066cc;
    color: #0066cc;
}

.page-current {
    padding: 8px 16px;
    color: #0b2c4a;
    font-size: 14px;
    background: #f5f9ff;
    border-radius: 6px;
    border: 1px solid #d9e6f2;
    font-weight: 500;
}

.page-info {
    color: #6f7d8a;
    font-size: 13px;
    margin-left: 4px;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px !important;
    color: #8b9aad;
}

.empty-state span {
    font-size: 48px;
    display: block;
    margin-bottom: 16px;
}

.empty-state div {
    font-size: 16px;
}

/* 页脚 */
.footer {
    margin-top: 24px;
    text-align: center;
    color: #8b9aad;
    font-size: 12px;
    border-top: 1px solid #d9e6f2;
    padding-top: 20px;
}

/* 弹窗样式 - 全屏 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    overflow: hidden;
}

.modal-content {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 90%;
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 0;
    border: none;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    animation: slideDown 0.3s ease;
}

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

.modal-header {
    padding: 16px 24px;
    border-bottom: 1px solid #d9e6f2;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f5f9ff;
    flex-shrink: 0;
}

.modal-header h3 {
    color: #0b2c4a;
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.modal-close {
    font-size: 28px;
    cursor: pointer;
    color: #666;
    line-height: 1;
    transition: color 0.2s ease;
}

.modal-close:hover {
    color: #0066cc;
}

.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 0;
    background: white;
}

.modal-body iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* 身份切换样式 */
.identity-switch {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    background: #f5f9ff;
    padding: 4px;
    border-radius: 40px;
    border: 1px solid #d9e6f2;
}

.identity-option {
    flex: 1;
    padding: 10px;
    text-align: center;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 500;
    transition: 0.2s;
    background: transparent;
    border: none;
}

.identity-option.active {
    background: #0066cc;
    color: white;
}

/* 隐藏元素 */
.hidden {
    display: none !important;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .stats-card {
        flex-direction: column;
        gap: 15px;
    }
    
    .stat-item {
        text-align: center;
    }
}

@media (max-width: 768px) {
    body {
        padding: 12px;
    }
    
    .container {
        padding: 16px;
    }
    
    .header-actions {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .button-group {
        width: 100%;
        justify-content: flex-start;
    }
    
    th, td {
        padding: 10px 8px;
        font-size: 13px;
    }
    
    .modal-content {
        width: 100%;
        max-width: 100%;
    }
    
    .pagination {
        gap: 4px;
    }
    
    .page-link, .page-current {
        padding: 6px 10px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .btn {
        padding: 6px 12px;
        font-size: 13px;
    }
    
    .stat-value {
        font-size: 22px;
    }
}