:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary: #64748b;
    --success: #16a34a;
    --warning: #d97706;
    --danger: #dc2626;
    --light: #f8fafc;
    --dark: #1e293b;
    --gray: #94a3b8;
    --border: #e2e8f0;
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --bg-card: #fff;
    --bg-page: var(--light);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    background: var(--bg-page);
    color: var(--dark);
    line-height: 1.8;
}

.report-header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 0 24px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}

.report-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
}

.report-logo-icon {
    font-size: 24px;
}

.report-nav a {
    color: var(--secondary);
    text-decoration: none;
    margin-left: 20px;
    font-size: 15px;
}

.report-nav a:hover {
    color: var(--primary);
}

.report-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 24px;
}

.report-title {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 12px;
    color: var(--dark);
}

.report-meta {
    color: var(--secondary);
    font-size: 14px;
    margin-bottom: 32px;
}

.report-section {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 28px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.report-section h2 {
    font-size: 22px;
    color: var(--primary);
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid #eff6ff;
}

.report-section h3 {
    font-size: 18px;
    margin: 20px 0 10px;
    color: var(--dark);
}

.report-section p {
    margin-bottom: 12px;
    text-align: justify;
}

.report-section ul,
.report-section ol {
    margin: 12px 0 12px 24px;
}

.report-section li {
    margin-bottom: 8px;
}

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

.report-table th,
.report-table td {
    border: 1px solid var(--border);
    padding: 10px 12px;
    text-align: left;
}

.report-table th {
    background: #eff6ff;
    color: var(--primary);
    font-weight: 600;
}

.report-table tr:nth-child(even) {
    background: #f8fafc;
}

.highlight-box {
    background: #eff6ff;
    border-left: 4px solid var(--primary);
    padding: 16px 20px;
    border-radius: 0 8px 8px 0;
    margin: 16px 0;
}

.warning-box {
    background: #fffbeb;
    border-left: 4px solid var(--warning);
}

.success-box {
    background: #f0fdf4;
    border-left: 4px solid var(--success);
}

.data-bar {
    display: flex;
    align-items: center;
    margin: 10px 0;
}

.data-bar-label {
    width: 120px;
    font-size: 14px;
    color: var(--secondary);
    flex-shrink: 0;
}

.data-bar-track {
    flex: 1;
    height: 20px;
    background: #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    margin: 0 12px;
}

.data-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), #60a5fa);
    border-radius: 10px;
    transition: width 0.6s ease;
}

.data-bar-fill.danger {
    background: linear-gradient(90deg, var(--danger), #f87171);
}

.data-bar-fill.success {
    background: linear-gradient(90deg, var(--success), #4ade80);
}

.data-bar-fill.warning {
    background: linear-gradient(90deg, var(--warning), #fbbf24);
}

.data-bar-value {
    width: 70px;
    text-align: right;
    font-weight: 700;
    font-size: 14px;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
    margin: 20px 0;
}

.metric-card {
    background: #f8fafc;
    border-radius: 10px;
    padding: 18px;
    text-align: center;
    border: 1px solid var(--border);
}

.metric-value {
    font-size: 28px;
    font-weight: 800;
    color: var(--primary);
}

.metric-label {
    font-size: 13px;
    color: var(--secondary);
    margin-top: 6px;
}

.tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    margin-right: 6px;
}

.tag-high {
    background: #fee2e2;
    color: #991b1b;
}

.tag-medium {
    background: #fef3c7;
    color: #92400e;
}

.tag-low {
    background: #e2e8f0;
    color: #475569;
}

@media (max-width: 768px) {
    body {
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }

    .report-header {
        height: 56px;
        padding: 0 12px;
        padding-left: max(12px, env(safe-area-inset-left));
        padding-right: max(12px, env(safe-area-inset-right));
        padding-top: env(safe-area-inset-top);
        flex-wrap: nowrap;
    }

    .report-logo {
        font-size: 15px;
        gap: 6px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .report-logo-icon {
        font-size: 20px;
    }

    .report-nav {
        display: flex;
        gap: 12px;
        flex-shrink: 0;
    }

    .report-nav a {
        margin: 0;
        font-size: 14px;
        white-space: nowrap;
    }

    .report-title {
        font-size: 22px;
        line-height: 1.3;
    }

    .report-container {
        padding: 20px 16px;
        padding-bottom: max(20px, env(safe-area-inset-bottom));
    }

    .report-section {
        padding: 18px;
        margin-bottom: 16px;
    }

    .report-section h2 {
        font-size: 18px;
    }

    .report-section h3 {
        font-size: 16px;
    }

    .report-section p {
        text-align: left;
    }

    /* 表格横向滚动 */
    .report-table {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
        font-size: 13px;
    }

    .report-table thead,
    .report-table tbody,
    .report-table tr,
    .report-table th,
    .report-table td {
        white-space: nowrap;
    }

    .report-table th,
    .report-table td {
        padding: 8px 10px;
    }

    .data-bar {
        flex-wrap: wrap;
        gap: 6px 0;
    }

    .data-bar-label {
        width: 100%;
        font-size: 13px;
    }

    .data-bar-track {
        flex: 1 1 auto;
        margin: 0;
        min-width: 0;
    }

    .data-bar-value {
        width: auto;
        min-width: 50px;
    }

    .metric-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .metric-card {
        padding: 14px;
    }

    .metric-value {
        font-size: 22px;
    }

    .highlight-box {
        padding: 12px 16px;
    }

    .report-section ul,
    .report-section ol {
        margin-left: 18px;
    }

    /* 触摸目标 */
    .report-nav a,
    .report-logo {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
}
