/* 
 * Ledger Hub 风格统一样式
 * 基于 ledger_hub.php 的设计规范
 * 应用于所有模块页面
 */

/* 全局基础样式 */
body {
    font-family: "Microsoft YaHei", Arial, sans-serif;
    background: #f2f4f8;
    color: #1f2d3d;
    line-height: 1.6;
}

/* 容器样式 */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px 18px 40px;
}

/* 页面标题 */
.page-title {
    text-align: center;
    margin-bottom: 24px;
}

.page-title h1 {
    margin: 0;
    font-size: 26px;
    color: #1f2d3d;
}

.page-title p {
    margin: 8px 0 0;
    color: #667180;
    font-size: 14px;
}

/* 返回首页按钮 */
.back-home-btn {
    display: inline-block;
    margin-top: 16px;
    padding: 10px 20px;
    background: #4caf50;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.back-home-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(76, 175, 80, 0.3);
}

/* 摘要卡片网格 */
.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

/* 摘要卡片 */
.summary-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
    position: relative;
    overflow: hidden;
}

.summary-card::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(33,150,243,0.08), transparent);
}

.summary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.summary-header h2 {
    margin: 0;
    font-size: 18px;
    color: #1f2d3d;
}

.summary-total {
    font-size: 32px;
    font-weight: 700;
    color: #0f9d58;
}

.summary-meta {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 12px;
}

.meta-item {
    background: #f7fafc;
    border-radius: 8px;
    padding: 10px;
    text-align: center;
}

.meta-item h3 {
    margin: 0;
    font-size: 13px;
    color: #667180;
}

.meta-item span {
    display: block;
    margin-top: 6px;
    font-size: 18px;
    font-weight: 600;
    color: #1f2d3d;
}

.meta-item.warning {
    background: #fff4de;
}

.meta-item.warning span {
    color: #e67e22;
}

/* 区块样式 */
.section-block {
    background: #fff;
    border-radius: 12px;
    padding: 18px;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
    margin-bottom: 24px;
}

.section-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.section-header h3 {
    margin: 0;
    font-size: 18px;
    color: #1f2d3d;
}

.section-header h3 a {
    text-decoration: none;
    color: inherit;
    transition: color 0.15s ease;
}

.section-header h3 a:hover {
    color: #2196f3;
}

.section-header p {
    margin: 0;
    color: #667180;
    font-size: 13px;
}

/* 进入按钮 */
.enter-btn {
    padding: 6px 14px;
    border: 1px solid #2196f3;
    border-radius: 6px;
    text-decoration: none;
    font-size: 13px;
    color: #2196f3;
    background: transparent;
    transition: all 0.15s ease;
}

.enter-btn:hover {
    background: #2196f3;
    color: white;
}

/* 表格样式 */
table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    background: #fff;
}

th, td {
    padding: 10px 12px;
    border-bottom: 1px solid #e5e9f2;
    text-align: left;
}

th {
    background: #f8fafc;
    color: #4a5568;
    font-weight: 600;
}

/* 徽章样式 */
.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 12px;
    color: #fff;
}

.badge.normal {
    background: #42b983;
}

.badge.key {
    background: #ff9800;
}

.badge.overdue {
    background: #e74c3c;
}

/* 空状态提示 */
.empty-tip {
    text-align: center;
    color: #94a3b8;
    padding: 20px 0;
    font-size: 13px;
}

/* 快捷链接 */
.quick-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.quick-links a {
    padding: 8px 14px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 13px;
    background: #2196f3;
    color: #fff;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.quick-links a:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(33, 150, 243, 0.2);
}

/* 操作按钮 */
.handle-btn {
    padding: 5px 10px;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    background: #ff9800;
    color: white;
}

.handle-btn:hover {
    background: #f57c00;
}

.handle-btn.edit {
    background: #2196f3;
}

.handle-btn.edit:hover {
    background: #1976d2;
}

/* 表格行高亮 */
.table-row-key {
    background: #fff4de;
}

.table-row-overdue {
    background: #fee;
}

/* 表单样式（与 ledger_hub 保持一致） */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
    color: #1f2d3d;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e5e9f2;
    border-radius: 6px;
    font-size: 14px;
    background: #ffffff;
    color: #1f2d3d;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2196f3;
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

/* 按钮样式 */
.btn-primary {
    background: #4caf50;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(76, 175, 80, 0.3);
}

.btn-secondary {
    background: #2196f3;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(33, 150, 243, 0.3);
}

.btn-danger {
    background: #e74c3c;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(231, 76, 60, 0.3);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 15px 12px 30px;
    }
    
    .summary-grid {
        grid-template-columns: 1fr;
    }
    
    th, td {
        padding: 8px;
        font-size: 12px;
    }
    
    .page-title h1 {
        font-size: 22px;
    }
    
    .summary-total {
        font-size: 28px;
    }
}
