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

body {
    font-family: 'Noto Sans KR', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

/* 헤더 */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px;
    text-align: center;
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.header h1 i {
    margin-right: 15px;
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    font-weight: 300;
}

/* 탭 메뉴 */
.tabs {
    display: flex;
    background: #f8f9fa;
    border-bottom: 2px solid #e9ecef;
}

.tab-button {
    flex: 1;
    padding: 20px;
    background: transparent;
    border: none;
    font-size: 1rem;
    font-weight: 500;
    color: #6c757d;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.tab-button i {
    margin-right: 8px;
}

.tab-button:hover {
    background: #e9ecef;
    color: #495057;
}

.tab-button.active {
    color: #667eea;
    background: white;
}

.tab-button.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: #667eea;
}

/* 탭 컨텐츠 */
.tab-content {
    display: none;
    padding: 30px;
    animation: fadeIn 0.3s;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 점검 헤더 */
.check-header {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.date-selector,
.checker-info {
    flex: 1;
    min-width: 250px;
}

.date-selector label,
.checker-info label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #495057;
}

.date-input,
.checker-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.date-input:focus,
.checker-input:focus {
    outline: none;
    border-color: #667eea;
}

/* 진행률 표시 */
.progress-info {
    margin-bottom: 30px;
}

.progress-bar-container {
    width: 100%;
    height: 30px;
    background: #e9ecef;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    transition: width 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    width: 0%;
}

.progress-text {
    text-align: center;
    font-weight: 600;
    color: #495057;
}

/* 체크리스트 컨테이너 */
.checklist-container {
    margin-bottom: 30px;
}

.category-section {
    margin-bottom: 30px;
}

.category-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 15px;
    font-size: 1.2rem;
    font-weight: 600;
}

.category-header i {
    margin-right: 10px;
}

.check-item {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 15px;
    transition: all 0.3s;
}

.check-item:hover {
    border-color: #667eea;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.1);
}

.item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.item-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
}

.item-description {
    color: #6c757d;
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.status-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.status-btn {
    flex: 1;
    min-width: 80px;
    padding: 10px 15px;
    border: 2px solid #e9ecef;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.9rem;
    font-weight: 500;
}

.status-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.status-btn.active {
    color: white;
    font-weight: 600;
}

.status-btn.good.active {
    background: #28a745;
    border-color: #28a745;
}

.status-btn.bad.active {
    background: #dc3545;
    border-color: #dc3545;
}

.status-btn.normal.active {
    background: #ffc107;
    border-color: #ffc107;
}

.status-btn.na.active {
    background: #6c757d;
    border-color: #6c757d;
}

.note-input {
    width: 100%;
    padding: 10px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 0.9rem;
    resize: vertical;
    min-height: 60px;
}

.note-input:focus {
    outline: none;
    border-color: #667eea;
}

/* 버튼 스타일 */
.action-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 15px 40px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

/* 점검 이력 */
.history-filters {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.filter-group {
    flex: 1;
    min-width: 200px;
}

.filter-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #495057;
}

.history-container {
    max-height: 600px;
    overflow-y: auto;
}

.history-date-group {
    margin-bottom: 30px;
}

.history-date-header {
    background: #667eea;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 600;
    margin-bottom: 15px;
}

.history-item {
    background: #f8f9fa;
    border-left: 4px solid #e9ecef;
    padding: 15px 20px;
    margin-bottom: 10px;
    border-radius: 5px;
}

.history-item.good {
    border-left-color: #28a745;
}

.history-item.bad {
    border-left-color: #dc3545;
}

.history-item.normal {
    border-left-color: #ffc107;
}

.history-item.na {
    border-left-color: #6c757d;
}

.history-item-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.history-item-title {
    font-weight: 600;
    color: #333;
}

.history-item-status {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    color: white;
}

.history-item-status.good {
    background: #28a745;
}

.history-item-status.bad {
    background: #dc3545;
}

.history-item-status.normal {
    background: #ffc107;
}

.history-item-status.na {
    background: #6c757d;
}

.history-item-note {
    color: #6c757d;
    font-size: 0.9rem;
    margin-top: 5px;
}

.history-item-info {
    font-size: 0.85rem;
    color: #6c757d;
    margin-top: 8px;
}

/* 관리 화면 */
.manage-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.manage-header h2 {
    color: #333;
    font-weight: 600;
}

.manage-container {
    max-height: 600px;
    overflow-y: auto;
}

.manage-category {
    margin-bottom: 30px;
}

.manage-item {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.manage-item-info {
    flex: 1;
}

.manage-item-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.manage-item-description {
    color: #6c757d;
    font-size: 0.9rem;
}

.manage-item-actions {
    display: flex;
    gap: 10px;
}

.btn-small {
    padding: 8px 15px;
    font-size: 0.85rem;
}

/* 모달 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    animation: fadeIn 0.3s;
}

.modal.show {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: white;
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    border-bottom: 2px solid #e9ecef;
}

.modal-header h3 {
    color: #333;
    font-weight: 600;
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #6c757d;
    transition: color 0.3s;
}

.close-modal:hover {
    color: #dc3545;
}

.modal-body {
    padding: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #495057;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
}

.modal-footer {
    padding: 20px 30px;
    border-top: 2px solid #e9ecef;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* 빈 상태 메시지 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.3;
}

.empty-state p {
    font-size: 1.1rem;
}

/* 인쇄 스타일 */
@media print {
    body {
        background: white;
        padding: 0;
    }

    .container {
        box-shadow: none;
        border-radius: 0;
    }

    .tabs,
    .action-buttons,
    .status-buttons,
    .note-input {
        display: none !important;
    }

    .tab-content {
        display: block !important;
    }

    .check-item {
        page-break-inside: avoid;
    }
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .header {
        padding: 30px 20px;
    }

    .header h1 {
        font-size: 1.8rem;
    }

    .tab-button {
        padding: 15px 10px;
        font-size: 0.9rem;
    }

    .tab-content {
        padding: 20px;
    }

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

    .status-buttons {
        flex-direction: column;
    }

    .status-btn {
        min-width: 100%;
    }

    .action-buttons {
        flex-direction: column;
    }

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

    .manage-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .manage-item-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .modal-content {
        width: 95%;
    }

    .modal-body,
    .modal-header,
    .modal-footer {
        padding: 20px;
    }
}
