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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

header p {
    font-size: 1.1rem;
    opacity: 0.95;
}

.main-content {
    display: flex;
    flex: 1;
    gap: 2rem;
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.sidebar {
    width: 250px;
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    height: fit-content;
    position: sticky;
    top: 20px;
}

.sidebar h2 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: #667eea;
}

/* 검색창 스타일 */
.search-box {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.search-input {
    flex: 1;
    padding: 0.6rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: border-color 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.search-btn {
    padding: 0.6rem 1rem;
    background-color: #667eea;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.3s ease;
}

.search-btn:hover {
    background-color: #764ba2;
}



.report-area {
    flex: 1;
    background: white;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    min-height: 600px;
    overflow-y: auto;
}

#reportContainer {
    max-width: 900px;
    margin: 0 auto;
}

.placeholder {
    text-align: center;
    color: #999;
    padding: 3rem;
    font-size: 1.1rem;
}



.report-content h1 {
    font-size: 2rem;
    margin: 1.5rem 0 1rem 0;
    color: #333;
    border-bottom: 2px solid #667eea;
    padding-bottom: 0.5rem;
}

.report-content h2 {
    font-size: 1.5rem;
    margin: 1.5rem 0 0.75rem 0;
    color: #667eea;
}

.report-content h3 {
    font-size: 1.2rem;
    margin: 1rem 0 0.5rem 0;
    color: #555;
}

.report-content p {
    margin-bottom: 1rem;
    text-align: justify;
}

.report-content ul, .report-content ol {
    margin-left: 2rem;
    margin-bottom: 1rem;
}

.report-content li {
    margin-bottom: 0.5rem;
}

.report-content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}

.report-content table th,
.report-content table td {
    border: 1px solid #ddd;
    padding: 0.75rem;
    text-align: left;
}

.report-content table th {
    background-color: #f0f0f0;
    font-weight: 600;
}

.report-content blockquote {
    border-left: 4px solid #667eea;
    padding-left: 1rem;
    margin-left: 0;
    margin-bottom: 1rem;
    color: #666;
    font-style: italic;
}

.report-content code {
    background-color: #f5f5f5;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
}

.report-content pre {
    background-color: #f5f5f5;
    padding: 1rem;
    border-radius: 6px;
    overflow-x: auto;
    margin-bottom: 1rem;
}

footer {
    background-color: #333;
    color: white;
    text-align: center;
    padding: 1.5rem;
    margin-top: auto;
}

/* 프린트 스타일 */
@media print {
    .sidebar, header, footer {
        display: none;
    }

    .main-content {
        padding: 0;
        gap: 0;
        max-width: 100%;
    }

    .report-area {
        box-shadow: none;
        padding: 0;
        min-height: auto;
    }

    .document-list {
        page-break-after: avoid;
    }

    .report-content {
        page-break-inside: avoid;
    }

    body {
        background-color: white;
    }

    .report-content h1 {
        page-break-before: always;
    }
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .main-content {
        flex-direction: column;
        gap: 1rem;
    }

    .sidebar {
        width: 100%;
        position: static;
    }

    header h1 {
        font-size: 1.8rem;
    }

    .report-area {
        min-height: auto;
    }
}
