/* 基础重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #f5f6f7;
    color: #1a1a1a;
    height: 100vh;
    overflow: hidden;
}

/* 布局 */
.app {
    display: flex;
    height: 100vh;
}

/* 侧边栏 */
.sidebar {
    width: 280px;
    background: #fff;
    border-right: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.sidebar-header h1 {
    font-size: 18px;
    font-weight: 600;
    color: #b71c1c;
    margin-bottom: 12px;
}

.btn-generate {
    width: 100%;
    padding: 10px;
    background: #b71c1c;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-generate:hover {
    background: #9a1515;
}

.btn-generate:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.search-box {
    padding: 12px 20px;
    border-bottom: 1px solid #e0e0e0;
}

.search-box input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    outline: none;
}

.search-box input:focus {
    border-color: #b71c1c;
}

/* 日期列表 */
.report-list {
    list-style: none;
    overflow-y: auto;
    flex: 1;
}

.report-list li {
    padding: 14px 20px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background 0.15s;
    font-size: 14px;
}

.report-list li:hover {
    background: #f8f8f8;
}

.report-list li.active {
    background: #fdeaea;
    border-left: 3px solid #b71c1c;
    padding-left: 17px;
}

.report-list li.loading,
.report-list li.empty {
    color: #999;
    text-align: center;
    cursor: default;
}

.report-list li.empty:hover,
.report-list li.loading:hover {
    background: transparent;
}

.report-list .report-date {
    font-weight: 500;
    color: #333;
}

.report-list .report-title {
    font-size: 12px;
    color: #888;
    margin-top: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

.report-header {
    padding: 20px 32px;
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.report-header h2 {
    font-size: 20px;
    font-weight: 600;
}

.report-header span {
    color: #888;
    font-size: 14px;
}

.report-body {
    flex: 1;
    overflow-y: auto;
    padding: 32px;
}

/* Markdown 渲染样式 */
.report-body h1 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #b71c1c;
    border-bottom: 2px solid #b71c1c;
    padding-bottom: 10px;
}

.report-body h2 {
    font-size: 18px;
    margin-top: 28px;
    margin-bottom: 14px;
    color: #333;
    font-weight: 600;
}

.report-body h3 {
    font-size: 15px;
    margin-top: 18px;
    margin-bottom: 10px;
    color: #444;
}

.report-body p {
    line-height: 1.8;
    margin-bottom: 12px;
    color: #333;
    font-size: 14px;
}

.report-body ul,
.report-body ol {
    margin-left: 20px;
    margin-bottom: 12px;
}

.report-body li {
    line-height: 1.8;
    margin-bottom: 6px;
    font-size: 14px;
}

.report-body strong {
    color: #1a1a1a;
}

.report-body blockquote {
    border-left: 4px solid #b71c1c;
    padding-left: 16px;
    margin: 16px 0;
    color: #555;
    background: #fafafa;
    padding: 12px 16px;
    border-radius: 0 4px 4px 0;
}

.report-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    font-size: 13px;
}

.report-body th,
.report-body td {
    border: 1px solid #ddd;
    padding: 10px 12px;
    text-align: left;
}

.report-body th {
    background: #f5f5f5;
    font-weight: 600;
}

.report-body tr:nth-child(even) {
    background: #fafafa;
}

/* 占位提示 */
.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #999;
    font-size: 15px;
}

/* 弹窗 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: #fff;
    padding: 40px 60px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.modal-content p {
    margin-top: 16px;
    color: #555;
    font-size: 14px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f0f0f0;
    border-top-color: #b71c1c;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 滚动条美化 */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #aaa;
}
