/* 기본 스타일 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --bg-color: #f8fafc;
    --text-color: #1e293b;
    --border-color: #e2e8f0;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Segoe UI', 'Malgun Gothic', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 헤더 */
.header {
    background: white;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--text-color);
    font-weight: 700;
    font-size: 1.25rem;
}

.logo-icon {
    font-size: 1.5rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    text-decoration: none;
    color: var(--secondary-color);
    font-weight: 500;
    transition: color 0.2s;
}

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

/* 메인 컨테이너 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    flex: 1;
}

/* 히어로 섹션 */
.hero-section {
    text-align: center;
    padding: 3rem 0;
}

.hero-title {
    font-size: 2.5rem;
    color: var(--text-color);
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--secondary-color);
    margin-bottom: 3rem;
}

/* 액션 카드 */
.action-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.card {
    background: white;
    padding: 2rem;
    border-radius: 0.75rem;
    box-shadow: var(--shadow);
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.3s;
    border: 2px solid transparent;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.card-primary {
    border-color: var(--primary-color);
}

.card-primary:hover {
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
    color: white;
}

.card-secondary:hover {
    background: linear-gradient(135deg, #64748b 0%, #94a3b8 100%);
    color: white;
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.card p {
    font-size: 1rem;
    opacity: 0.8;
}

/* 기능 섹션 */
.features-section {
    margin-top: 4rem;
}

.features-section h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature-item {
    background: white;
    padding: 2rem;
    border-radius: 0.5rem;
    text-align: center;
    box-shadow: var(--shadow);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-item h4 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

/* 최근 목록 */
.recent-section {
    margin-top: 3rem;
}

.recent-section h2 {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
}

.recent-list {
    background: white;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.recent-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    text-decoration: none;
    color: var(--text-color);
    transition: background 0.2s;
}

.recent-item:last-child {
    border-bottom: none;
}

.recent-item:hover {
    background: var(--bg-color);
}

.recent-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.recent-number {
    color: var(--secondary-color);
    font-size: 0.875rem;
}

.recent-meta {
    color: var(--secondary-color);
    font-size: 0.875rem;
}

/* 페이지 헤더 */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.page-header h1 {
    font-size: 2rem;
}

/* 폼 스타일 */
.inspection-form {
    background: white;
    padding: 2rem;
    border-radius: 0.75rem;
    box-shadow: var(--shadow);
}

.form-section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--border-color);
}

.form-section:last-of-type {
    border-bottom: none;
}

.form-section h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.form-row {
    margin-bottom: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="date"],
.form-group textarea,
.form-group select {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group textarea {
    resize: vertical;
}

.radio-group,
.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.radio-group label,
.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 400;
    cursor: pointer;
}

/* 버튼 */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.375rem;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: #1d4ed8;
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background: #475569;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-view {
    background: var(--success-color);
    color: white;
}

.btn-view:hover {
    background: #059669;
}

.btn-delete {
    background: var(--danger-color);
    color: white;
}

.btn-delete:hover {
    background: #dc2626;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2rem;
}

/* 문서 뷰 */
.document {
    background: white;
    padding: 3rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow);
    margin-top: 2rem;
}

.doc-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--text-color);
}

.warning-text {
    color: #f59e0b;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.doc-title-line {
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.page-num {
    float: right;
}

.doc-title {
    font-size: 2rem;
    font-weight: 700;
    margin: 1rem 0;
}

.record-number {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-color);
}

.doc-section {
    margin-bottom: 2rem;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    padding: 0.5rem;
    background: var(--bg-color);
    border-left: 4px solid var(--primary-color);
}

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

.info-table th,
.info-table td {
    border: 1px solid var(--border-color);
    padding: 0.75rem;
}

.info-table th {
    background: var(--bg-color);
    font-weight: 600;
    text-align: left;
    width: 150px;
}

.inspector-info {
    background: var(--bg-color);
    padding: 1.5rem;
    border-radius: 0.375rem;
}

.inspector-info p {
    margin-bottom: 0.5rem;
}

.special-notes {
    margin-top: 1rem;
    padding: 1rem;
    background: #fef3c7;
    border-left: 4px solid var(--warning-color);
}

.special-notes h3 {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

.notice-section {
    background: #f0f9ff;
    padding: 1.5rem;
    border-radius: 0.375rem;
}

.notice-content ul {
    list-style: disc;
    margin-left: 2rem;
}

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

.print-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

/* 목록 테이블 */
.list-table {
    width: 100%;
    background: white;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.list-table thead {
    background: var(--primary-color);
    color: white;
}

.list-table th,
.list-table td {
    padding: 1rem;
    text-align: left;
}

.list-table tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s;
}

.list-table tbody tr:hover {
    background: var(--bg-color);
}

.action-cell {
    display: flex;
    gap: 0.5rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.empty-state h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--secondary-color);
    margin-bottom: 2rem;
}

/* 에러 페이지 */
.error-page {
    text-align: center;
    padding: 4rem 2rem;
}

.error-icon {
    font-size: 5rem;
    margin-bottom: 1rem;
}

.error-page h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.error-page p {
    color: var(--secondary-color);
    margin-bottom: 2rem;
}

/* 푸터 */
.footer {
    background: white;
    padding: 2rem;
    text-align: center;
    border-top: 1px solid var(--border-color);
    margin-top: auto;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-note {
    color: var(--secondary-color);
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-menu {
        gap: 1rem;
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .action-cards {
        grid-template-columns: 1fr;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .document {
        padding: 1.5rem;
    }
    
    .list-table {
        font-size: 0.875rem;
    }
    
    .list-table th,
    .list-table td {
        padding: 0.5rem;
    }
}

