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

:root {
    --primary-color: #4F46E5;
    --primary-hover: #4338CA;
    --secondary-color: #6B7280;
    --danger-color: #DC2626;
    --danger-hover: #B91C1C;
    --success-color: #10B981;
    --warning-color: #F59E0B;
    --info-color: #3B82F6;
    --bg-color: #F9FAFB;
    --card-bg: #FFFFFF;
    --text-primary: #111827;
    --text-secondary: #6B7280;
    --border-color: #E5E7EB;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Noto Sans KR', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

/* 헤더 */
.header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px 20px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #7C3AED 100%);
    border-radius: 16px;
    color: white;
    box-shadow: var(--shadow-lg);
}

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

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

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

/* 섹션 공통 스타일 */
.form-section,
.list-section,
.chart-section {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-md);
}

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

.section-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.section-header h2 i {
    margin-right: 10px;
    color: var(--primary-color);
}

/* 폼 스타일 */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

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

.form-group label {
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.form-group label i {
    margin-right: 8px;
    color: var(--primary-color);
    width: 16px;
    text-align: center;
}

.form-group input {
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Noto Sans KR', sans-serif;
    transition: all 0.3s ease;
    background-color: #FFFFFF;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-start;
}

/* 버튼 스타일 */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    font-family: 'Noto Sans KR', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn i {
    font-size: 0.9rem;
}

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

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

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

.btn-secondary:hover {
    background-color: #4B5563;
}

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

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

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

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

.btn-sm {
    padding: 6px 12px;
    font-size: 0.875rem;
}

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

.btn-edit:hover {
    background-color: #2563EB;
}

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

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

/* 목록 스타일 */
.list-stats {
    font-size: 1rem;
    color: var(--text-secondary);
}

.list-stats strong {
    color: var(--primary-color);
    font-weight: 600;
}

.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background-color: #F3F4F6;
}

thead th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 2px solid var(--border-color);
    font-size: 0.95rem;
}

tbody td {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
}

tbody tr:hover {
    background-color: #F9FAFB;
}

.empty-state {
    text-align: center;
    padding: 60px 20px !important;
}

.empty-state i {
    font-size: 4rem;
    color: var(--text-secondary);
    opacity: 0.3;
    margin-bottom: 15px;
    display: block;
}

.empty-state p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin: 5px 0;
}

.empty-hint {
    font-size: 0.95rem !important;
    opacity: 0.7;
}

.status-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

.status-upcoming {
    background-color: #DBEAFE;
    color: #1E40AF;
}

.status-ongoing {
    background-color: #D1FAE5;
    color: #065F46;
}

.status-completed {
    background-color: #E5E7EB;
    color: #374151;
}

.action-buttons {
    display: flex;
    gap: 8px;
}

/* 차트 스타일 */
.chart-container {
    position: relative;
    padding: 20px;
    background-color: #FAFAFA;
    border-radius: 8px;
}

.chart-empty {
    text-align: center;
    padding: 100px 20px;
    display: none;
}

.chart-empty i {
    font-size: 5rem;
    color: var(--text-secondary);
    opacity: 0.2;
    margin-bottom: 20px;
    display: block;
}

.chart-empty p {
    color: var(--text-secondary);
    font-size: 1.2rem;
}

.chart-controls {
    display: flex;
    gap: 10px;
}

/* 모달 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    box-shadow: var(--shadow-lg);
    animation: modalSlideIn 0.3s ease;
}

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

.modal-header {
    padding: 25px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    font-size: 1.3rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-header h3 i {
    color: var(--warning-color);
}

.modal-body {
    padding: 25px;
}

.modal-body p {
    font-size: 1.05rem;
    margin-bottom: 10px;
}

.modal-project-name {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 1.1rem !important;
}

.modal-footer {
    padding: 20px 25px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Toast 알림 */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: var(--success-color);
    color: white;
    padding: 16px 24px;
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    display: none;
    align-items: center;
    gap: 12px;
    z-index: 2000;
    animation: toastSlideIn 0.3s ease;
}

.toast.show {
    display: flex;
}

.toast i {
    font-size: 1.2rem;
}

@keyframes toastSlideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

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

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

    .subtitle {
        font-size: 1rem;
    }

    .form-section,
    .list-section,
    .chart-section {
        padding: 20px;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .chart-container {
        height: 400px !important;
        padding: 10px;
    }

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

    thead th,
    tbody td {
        padding: 10px;
        font-size: 0.9rem;
    }

    .toast {
        bottom: 20px;
        right: 20px;
        left: 20px;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.5rem;
    }

    .form-actions {
        flex-direction: column;
    }

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