/* 我的报告页 */

body.my-reports-page {
    background: var(--page, #f0f2f5);
}

.mr-container {
    width: 100%;
}

.mr-page .nav-icon {
    margin-right: 8px;
    vertical-align: middle;
}

.mr-page .nav-emoji {
    margin-right: 8px;
}

/* 页头 */
.mr-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 0;
}

.mr-header-text h1,
.mr-header-text h2,
.mr-panel-head h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 6px;
}

.mr-header-text p {
    color: #718096;
    font-size: 0.95rem;
}

.mr-btn-write {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    background: var(--color-accent, #409eff);
    color: #fff;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    white-space: nowrap;
    box-shadow: 0 4px 14px rgba(102, 126, 234, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.mr-btn-write:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
    color: #fff;
}

/* 统计 Tab */
.mr-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 0;
}

.mr-stat-tab {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 18px 20px;
    background: #fff;
    border: 2px solid transparent;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
    text-align: left;
}

.mr-stat-tab:hover {
    border-color: #c3dafe;
}

.mr-stat-tab.active {
    border-color: var(--color-accent, #409eff);
    background: linear-gradient(135deg, #f7faff 0%, #edf2ff 100%);
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.15);
}

.mr-stat-label {
    font-size: 0.85rem;
    color: #718096;
    font-weight: 500;
}

.mr-stat-count {
    font-size: 1.6rem;
    font-weight: 700;
    color: #2d3748;
    line-height: 1.2;
}

.mr-stat-tab.active .mr-stat-count {
    color: #5a67d8;
}

/* 工具栏 */
.mr-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 16px;
    padding: 18px 22px;
    background: #fff;
    border-radius: 14px;
    margin-bottom: 0;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.mr-toolbar .filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 140px;
}

.mr-toolbar .filter-group label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #718096;
}

.mr-toolbar select {
    padding: 10px 36px 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 0.9rem;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23718096' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") no-repeat right 10px center;
    appearance: none;
    cursor: pointer;
}

.mr-toolbar select:focus {
    outline: none;
    border-color: var(--color-accent, #409eff);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

.mr-toolbar-spacer {
    flex: 1;
}

.mr-btn-refresh {
    padding: 10px 18px;
    border: 1px solid #e2e8f0;
    background: #fff;
    border-radius: 10px;
    font-size: 0.9rem;
    color: #4a5568;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mr-btn-refresh:hover {
    border-color: var(--color-accent, #409eff);
    color: var(--color-accent, #409eff);
    background: #f7faff;
}

/* 报告列表 */
.mr-list-section {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.mr-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 22px;
    border-bottom: 1px solid #edf2f7;
    font-size: 0.85rem;
    color: #718096;
}

.mr-list-header strong {
    color: #2d3748;
}

.mr-list {
    padding: 12px;
}

.mr-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    padding: 18px 20px;
    border-radius: 12px;
    border: 1px solid #edf2f7;
    margin-bottom: 10px;
    transition: background 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.mr-card:last-child {
    margin-bottom: 0;
}

.mr-card:hover {
    background: #f8fafc;
    border-color: #e2e8f0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.mr-card-main {
    min-width: 0;
}

.mr-card-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 8px;
    word-break: break-word;
}

.mr-card-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.mr-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.mr-badge.type-daily {
    background: #c6f6d5;
    color: #22543d;
}

.mr-badge.status-published {
    background: #bee3f8;
    color: #2c5282;
}

.mr-badge.status-draft {
    background: #feebc8;
    color: #7b341e;
}

.mr-badge.status-makeup {
    background: #fed7d7;
    color: #9b2c2c;
}

.mr-card-time {
    font-size: 0.82rem;
    color: #a0aec0;
}

.mr-card-preview {
    font-size: 0.88rem;
    color: #718096;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.mr-card-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-shrink: 0;
}

.mr-action-btn {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    min-width: 72px;
}

.mr-action-btn.view {
    background: #edf2f7;
    color: #4a5568;
}

.mr-action-btn.view:hover {
    background: #e2e8f0;
}

.mr-action-btn.edit {
    background: #ebf8ff;
    color: #2b6cb0;
}

.mr-action-btn.edit:hover {
    background: #bee3f8;
}

.mr-action-btn.delete {
    background: #fff5f5;
    color: #c53030;
}

.mr-action-btn.delete:hover {
    background: #fed7d7;
}

/* 空状态 */
.mr-empty {
    text-align: center;
    padding: 56px 24px;
}

.mr-empty-icon {
    font-size: 3rem;
    opacity: 0.5;
    margin-bottom: 12px;
}

.mr-empty h3 {
    font-size: 1.2rem;
    color: #2d3748;
    margin-bottom: 8px;
}

.mr-empty p {
    color: #718096;
    margin-bottom: 20px;
}

.mr-empty .mr-btn-write {
    display: inline-flex;
}

.mr-loading {
    text-align: center;
    padding: 48px;
    color: #a0aec0;
}

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

.mr-page-btn {
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    border: 1px solid #e2e8f0;
    background: #fff;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #4a5568;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mr-page-btn:hover:not(:disabled) {
    border-color: var(--color-accent, #409eff);
    color: var(--color-accent, #409eff);
}

.mr-page-btn.active {
    background: var(--color-accent, #409eff);
    border-color: transparent;
    color: #fff;
}

.mr-page-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.mr-page-info {
    font-size: 0.85rem;
    color: #a0aec0;
    margin: 0 8px;
}

/* 桌面宽屏：表格化行布局 */
@media (min-width: 900px) {
    .mr-list {
        padding: 8px 12px 12px;
    }

    .mr-card {
        grid-template-columns: minmax(0, 2fr) 100px 100px 140px auto;
        gap: 20px;
        align-items: center;
        padding: 16px 20px;
    }

    .mr-card-preview {
        -webkit-line-clamp: 1;
    }

    .mr-card-actions {
        flex-direction: row;
    }

    .mr-list-header .mr-col-type,
    .mr-list-header .mr-col-status,
    .mr-list-header .mr-col-time {
        display: inline;
    }
}

@media (max-width: 768px) {
    body.my-reports-page .main-content {
        padding: 16px;
    }

    .mr-header {
        flex-direction: column;
    }

    .mr-btn-write {
        width: 100%;
        justify-content: center;
    }

    .mr-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .mr-stat-tab {
        padding: 14px 12px;
    }

    .mr-stat-count {
        font-size: 1.35rem;
    }

    .mr-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .mr-toolbar .filter-group {
        width: 100%;
    }

    .mr-toolbar-spacer {
        display: none;
    }

    .mr-btn-refresh {
        width: 100%;
    }

    .mr-card {
        grid-template-columns: 1fr;
    }

    .mr-card-actions {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .mr-action-btn {
        flex: 1;
        min-width: 0;
    }
}
