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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #333;
    line-height: 1.6;
}

/* 로그인 페이지 */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-container {
    width: 100%;
    max-width: 420px;
}

.login-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 40px;
    animation: fadeInUp 0.5s ease-out;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    color: #0066cc;
    font-size: 28px;
    margin-bottom: 10px;
}

.login-header p {
    color: #666;
    font-size: 14px;
}

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

.login-form label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
}

.login-form input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s;
}

.login-form input:focus {
    outline: none;
    border-color: #0066cc;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.error-message {
    color: #dc3545;
    font-size: 13px;
    margin-bottom: 15px;
    min-height: 18px;
}

/* 네비게이션 바 */
.navbar {
    background: linear-gradient(135deg, #0066cc 0%, #004999 100%);
    color: white;
    padding: 16px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.navbar-brand h1 {
    font-size: 22px;
    font-weight: 600;
}

.navbar-menu {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* 메인 컨테이너 */
.main-container {
    padding: 30px;
    max-width: 1600px;
    margin: 0 auto;
}

.view {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    animation: fadeIn 0.3s ease-out;
}

.view-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e0e0e0;
}

.view-header h2 {
    color: #0066cc;
    font-size: 26px;
    font-weight: 600;
}

.view-controls {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* 버튼 스타일 */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-primary {
    background: linear-gradient(135deg, #0066cc 0%, #004999 100%);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0052a3 0%, #003366 100%);
}

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

.btn-secondary:hover {
    background: #545b62;
}

.btn-outline {
    background: transparent;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: white;
}

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

.btn-danger:hover {
    background: #c82333;
}

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

.btn-success:hover {
    background: #218838;
}

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

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

/* 프로젝트 그리드 */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.project-card {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 24px;
    transition: all 0.3s;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border-color: #0066cc;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--project-color, #0066cc);
}

.project-card-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 15px;
}

.project-card-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.project-card-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.project-card-description {
    color: #666;
    font-size: 14px;
    margin-bottom: 15px;
    line-height: 1.5;
}

.project-card-dates {
    display: flex;
    gap: 15px;
    font-size: 13px;
    color: #666;
    margin-bottom: 15px;
}

.project-card-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

/* 테이블 스타일 */
.table-container {
    overflow-x: auto;
    margin-top: 20px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.data-table thead {
    background: linear-gradient(135deg, #0066cc 0%, #004999 100%);
    color: white;
}

.data-table th {
    padding: 14px 12px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
}

.data-table td {
    padding: 12px;
    border-bottom: 1px solid #e0e0e0;
    font-size: 14px;
}

.data-table tbody tr:hover {
    background: #f8f9fa;
}

.status-badge, .priority-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.progress-bar-container {
    background: #e0e0e0;
    border-radius: 10px;
    height: 20px;
    overflow: hidden;
    position: relative;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #0066cc 0%, #004999 100%);
    transition: width 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 11px;
    font-weight: 600;
}

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

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

.modal-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease-out;
}

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

.modal-header h3 {
    color: #0066cc;
    font-size: 22px;
}

.close {
    font-size: 32px;
    font-weight: 300;
    color: #999;
    cursor: pointer;
    transition: color 0.3s;
}

.close:hover {
    color: #333;
}

.modal-body {
    padding: 25px;
}

.modal-footer {
    padding: 20px 25px;
    border-top: 2px solid #e0e0e0;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* 폼 스타일 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
    font-size: 14px;
}

.form-group input,
.form-group textarea,
.form-group select,
.select {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.3s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus,
.select:focus {
    outline: none;
    border-color: #0066cc;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.form-group input[type="color"] {
    height: 45px;
    cursor: pointer;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* 캘린더 */
.calendar-controls {
    display: flex;
    gap: 15px;
    align-items: center;
}

.current-month {
    font-size: 18px;
    font-weight: 600;
    color: #0066cc;
    min-width: 150px;
    text-align: center;
}

.calendar {
    margin-top: 20px;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: #e0e0e0;
    border: 1px solid #e0e0e0;
}

.calendar-header {
    background: linear-gradient(135deg, #0066cc 0%, #004999 100%);
    color: white;
    padding: 12px;
    text-align: center;
    font-weight: 600;
    font-size: 14px;
}

.calendar-day {
    background: white;
    min-height: 100px;
    padding: 8px;
    position: relative;
}

.calendar-day-number {
    font-size: 13px;
    font-weight: 600;
    color: #666;
    margin-bottom: 5px;
}

.calendar-day.other-month {
    background: #f8f9fa;
}

.calendar-day.other-month .calendar-day-number {
    color: #ccc;
}

.calendar-task {
    background: #0066cc;
    color: white;
    padding: 4px 6px;
    margin-bottom: 3px;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.calendar-task:hover {
    background: #004999;
}

/* 간트차트 */
.gantt-container {
    margin-top: 20px;
    overflow-x: auto;
}

.gantt-chart {
    min-width: 1200px;
}

.gantt-header {
    display: flex;
    border-bottom: 2px solid #0066cc;
}

.gantt-sidebar {
    width: 250px;
    background: #f8f9fa;
    padding: 10px;
    font-weight: 600;
    border-right: 2px solid #e0e0e0;
}

.gantt-timeline-header {
    flex: 1;
    display: flex;
    background: linear-gradient(135deg, #0066cc 0%, #004999 100%);
    color: white;
}

.gantt-month {
    padding: 10px;
    text-align: center;
    border-right: 1px solid rgba(255, 255, 255, 0.3);
    font-weight: 600;
    font-size: 13px;
}

.gantt-body {
    display: flex;
}

.gantt-tasks {
    width: 250px;
    border-right: 2px solid #e0e0e0;
}

.gantt-task-row {
    padding: 12px 10px;
    border-bottom: 1px solid #e0e0e0;
    background: #f8f9fa;
}

.gantt-task-name {
    font-weight: 500;
    font-size: 13px;
    color: #333;
    margin-bottom: 3px;
}

.gantt-task-project {
    font-size: 11px;
    color: #666;
}

.gantt-timeline {
    flex: 1;
    position: relative;
}

.gantt-grid {
    display: flex;
    height: 100%;
}

.gantt-grid-column {
    flex: 1;
    border-right: 1px solid #e0e0e0;
    position: relative;
}

.gantt-row {
    height: 48px;
    border-bottom: 1px solid #e0e0e0;
    position: relative;
}

.gantt-bar {
    position: absolute;
    height: 24px;
    background: linear-gradient(135deg, #0066cc 0%, #004999 100%);
    border-radius: 4px;
    top: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 0 8px;
    color: white;
    font-size: 11px;
    font-weight: 500;
    transition: all 0.3s;
}

.gantt-bar:hover {
    opacity: 0.8;
    transform: scaleY(1.1);
}

/* 애니메이션 */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

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

/* 반응형 */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 15px;
        padding: 15px;
    }

    .navbar-menu {
        flex-wrap: wrap;
        justify-content: center;
    }

    .main-container {
        padding: 15px;
    }

    .view {
        padding: 20px;
    }

    .view-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }

    .view-controls {
        width: 100%;
        flex-direction: column;
    }

    .view-controls .select,
    .view-controls .btn {
        width: 100%;
    }

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

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

    .calendar-day {
        min-height: 80px;
        font-size: 12px;
    }

    .data-table {
        font-size: 12px;
    }

    .data-table th,
    .data-table td {
        padding: 8px 6px;
    }
}

/* 상태 색상 */
.status-계획 {
    background: #17a2b8;
    color: white;
}

.status-진행중 {
    background: #28a745;
    color: white;
}

.status-완료 {
    background: #6c757d;
    color: white;
}

.status-보류 {
    background: #ffc107;
    color: #333;
}

.status-대기 {
    background: #17a2b8;
    color: white;
}

/* 우선순위 색상 */
.priority-낮음 {
    background: #28a745;
    color: white;
}

.priority-보통 {
    background: #17a2b8;
    color: white;
}

.priority-높음 {
    background: #ffc107;
    color: #333;
}

.priority-긴급 {
    background: #dc3545;
    color: white;
}
