/**
 * KEHRD 내강의실 스타일시트
 * 
 * 적용 페이지:
 * - myclass.html (학습중인 수업)
 * - myclass_end.html (학습종료된 수업)
 * - myclass_order_list.html (수강신청 내역)
 */

/* ========================================
   기본 스타일
======================================== */
body {
    background: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

#footer {
    background: #fff;
}

/* ========================================
   대시보드 컨테이너
======================================== */
.dashboard {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* ========================================
   대시보드 헤더
======================================== */
.dashboard-header {
    position: relative;
    margin-bottom: 30px;
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.dashboard-header h2 {
    font-size: 24px;
    color: #1a237e;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dashboard-header h2 i {
    color: #1976d2;
}

.dashboard-header p {
    color: #666;
    margin: 0;
}

/* ========================================
   네비게이션 버튼
======================================== */
.dashboard-nav {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 8px;
    background: #f5f7fa;
    color: #1a237e;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid #e0e6ed;
}

.nav-btn:hover {
    background: #1a237e;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.nav-btn i {
    font-size: 18px;
}

.nav-btn.active {
    background: #1a237e;
    color: white;
}

/* ========================================
   필터 섹션
======================================== */
.course-filter {
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.filter-form {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.filter-select {
    flex: 1;
    min-width: 150px;
    padding: 12px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    color: #333;
}

.filter-input {
    flex: 2;
    min-width: 200px;
    padding: 12px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
}

.filter-button {
    padding: 12px 24px;
    background: #1976d2;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.filter-button:hover {
    background: #1565c0;
}

/* ========================================
   과정 유형 뱃지
======================================== */
.course-type {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    margin-bottom: 8px;
    margin-right: 5px;
}

.type-general { background: #e3f2fd; color: #1976d2; }
.type-saup { background: #e8f5e9; color: #2e7d32; }
.type-ncs { background: #fff3e0; color: #f57c00; }
.type-nonrefund { background: #fce4ec; color: #c2185b; }
.type-safety { background: #db8c15; color: white; }

/* ========================================
   상태 뱃지
======================================== */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    margin-right: 5px;
}

.status-complete { background: #e8f5e9; color: #2e7d32; }
.status-incomplete { background: #fff3e0; color: #f57c00; }
.status-rest { background: #fce4ec; color: #c2185b; }
.status-pending { background: #fff3e0; color: #f57c00; }
.status-completed { background: #e8f5e9; color: #2e7d32; }
.status-refunded { background: #ffebee; color: #c62828; }

/* ========================================
   코스 카드 (myclass.html)
======================================== */
.course-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
    transition: transform 0.2s;
}

.course-card:hover {
    transform: translateY(-2px);
}

.course-info {
    flex: 1;
    min-width: 300px;
}

.course-title {
    font-size: 16px;
    font-weight: 600;
    color: #1a237e;
    margin-bottom: 10px;
}

.course-meta {
    display: flex;
    gap: 20px;
    color: #666;
    font-size: 13px;
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* ========================================
   진행률 섹션
======================================== */
.course-progress {
    min-width: 200px;
    padding: 0 15px;
    border-left: 1px solid #e0e0e0;
}

.progress-container {
    background: #e0e0e0;
    height: 6px;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-bar {
    height: 100%;
    background: #2196f3;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 13px;
    color: #666;
    text-align: center;
}

.progress-bar-container {
    background: #e0e0e0;
    height: 6px;
    border-radius: 3px;
    overflow: hidden;
    margin-top: 8px;
}

.progress-bar-fill {
    height: 100%;
    background: #2196f3;
    transition: width 0.3s ease;
}

/* ========================================
   액션 버튼
======================================== */
.course-action {
    min-width: 120px;
    text-align: right;
}

.btn-study {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #1976d2;
    color: white !important;
    border: none;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s;
    cursor: pointer;
}

.btn-study:hover {
    background: #1565c0;
    transform: translateY(-1px);
}

.btn-study.disabled {
    background: #ccc;
    cursor: not-allowed;
}

.btn-study.review {
    background: #e53935;
}

.btn-study.review:hover {
    background: #c62828;
}

.btn-rest {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #ff9800;
    color: white !important;
    border: none;
    border-radius: 8px;
    text-decoration: none;
    font-size: 13px;
    transition: all 0.3s;
    cursor: pointer;
    margin-top: 8px;
}

.btn-rest:hover {
    background: #f57c00;
}

/* ========================================
   공통 액션 버튼
======================================== */
.btn-action {
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
    border: none;
}

.btn-review {
    background: #1976d2;
    color: white !important;
}

.btn-review:hover {
    background: #1565c0;
}

.btn-certificate {
    background: #4caf50;
    color: white !important;
}

.btn-certificate:hover {
    background: #43a047;
}

.btn-license {
    background: #9c27b0;
    color: white !important;
}

.btn-license:hover {
    background: #7b1fa2;
}

.btn-cancel {
    background: #f5f5f5;
    color: #333;
}

.btn-cancel:hover {
    background: #e0e0e0;
}

.btn-receipt {
    background: #1976d2;
    color: white !important;
}

.btn-receipt:hover {
    background: #1565c0;
}

.btn-download {
    background: #4caf50;
    color: white !important;
}

.btn-download:hover {
    background: #43a047;
}

.btn-virtual {
    background: #ff9800;
    color: white !important;
}

.btn-virtual:hover {
    background: #f57c00;
}

/* ========================================
   빈 상태
======================================== */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.empty-state i {
    font-size: 48px;
    color: #ccc;
    margin-bottom: 15px;
    display: block;
}

.empty-state p {
    color: #666;
}

/* ========================================
   학습 예정 과정 섹션
======================================== */
.upcoming-section {
    background: #f7f9fc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
}

.upcoming-section h3 {
    color: #2d3748;
    margin-bottom: 20px;
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.upcoming-card {
    background: white;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.upcoming-info {
    flex: 1;
}

.upcoming-title {
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 5px;
}

.upcoming-date {
    font-size: 13px;
    color: #718096;
}

.upcoming-dday {
    background: #667eea;
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
}

/* ========================================
   SSO/법정의무교육 카드
======================================== */
.mandatory-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.mandatory-icon {
    width: 50px;
    height: 50px;
    background: #e3f2fd;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mandatory-icon i {
    font-size: 24px;
    color: #1976d2;
}

.mandatory-info {
    flex: 1;
}

.mandatory-info h3 {
    color: #1a237e;
    font-size: 18px;
    margin-bottom: 5px;
}

.mandatory-info p {
    color: #666;
    font-size: 14px;
    margin: 0;
}

.mandatory-card.locked {
    background: #f5f5f5;
}

.mandatory-card.locked .mandatory-icon {
    background: #ffebee;
}

.mandatory-card.locked .mandatory-icon i {
    color: #c62828;
}

.locked-message {
    color: #c62828 !important;
    font-weight: 500;
}

/* ========================================
   gongyoung1 추가 정보
======================================== */
.course-extra {
    display: flex;
    gap: 15px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed #e0e0e0;
    flex-wrap: wrap;
}

.extra-item {
    font-size: 13px;
    color: #666;
}

.extra-item strong {
    color: #1976d2;
}

/* ========================================
   학습종료 카드 (myclass_end.html)
======================================== */
.completed-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}

.completed-card:hover {
    transform: translateY(-2px);
}

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

.card-title-section {
    flex: 1;
    min-width: 300px;
}

/* 상세 정보 그리드 */
.card-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.detail-item {
    text-align: center;
}

.detail-label {
    color: #666;
    font-size: 12px;
    margin-bottom: 5px;
}

.detail-value {
    font-size: 16px;
    font-weight: 500;
    color: #333;
}

.detail-value a {
    color: #1976d2;
    text-decoration: none;
}

.detail-value a:hover {
    text-decoration: underline;
}

.detail-value.price {
    color: #1976d2;
    font-size: 18px;
}

/* 복습 기간 표시 */
.review-period {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #f5f5f5;
    border-radius: 8px;
    font-size: 13px;
    color: #666;
    margin-top: 10px;
}

.dday-badge {
    background: #ff5722;
    color: white;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

/* 액션 버튼 영역 */
.card-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

/* 총 수강시간 카드 */
.total-time-card {
    background: #e3f2fd;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 15px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.total-time-card strong {
    color: #1a237e;
    font-size: 18px;
}

/* ========================================
   결제 카드 (myclass_order_list.html)
======================================== */
.payment-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}

.payment-card:hover {
    transform: translateY(-2px);
}

.payment-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
    flex-wrap: wrap;
    gap: 10px;
}

.payment-title {
    flex: 1;
    min-width: 200px;
}

.payment-title h3 {
    font-size: 18px;
    color: #1a237e;
    margin-bottom: 5px;
    word-break: keep-all;
}

.payment-id {
    font-size: 13px;
    color: #666;
}

.payment-period {
    font-size: 13px;
    color: #999;
    margin-top: 5px;
}

.payment-status {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}

/* 결제 상세 정보 */
.payment-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

/* NCS 유형 표시 */
.ncs-type {
    background: #fff3e0;
    color: #f57c00;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 15px;
}

/* 결제 액션 버튼 */
.payment-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

/* ========================================
   패키지 탭
======================================== */
.package-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.package-tab {
    padding: 10px 20px;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: all 0.3s;
}

.package-tab.active {
    background: #1a237e;
    color: white;
    border-color: #1a237e;
}

.package-tab:hover {
    background: #1a237e;
    color: white;
}

/* ========================================
   모달 스타일
======================================== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 9999;
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    min-width: 300px;
    max-width: 90%;
    width: 400px;
}

.modal-header {
    margin-bottom: 20px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 15px;
    position: relative;
}

.modal-header h3 {
    margin: 0;
    color: #333;
    font-size: 20px;
}

.modal-close {
    position: absolute;
    top: 0;
    right: 0;
    font-size: 28px;
    cursor: pointer;
    color: #999;
    background: none;
    border: none;
}

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

.modal-body {
    text-align: center;
}

.modal-body p {
    margin-bottom: 25px;
    color: #666;
    font-size: 16px;
}

.modal-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}

.modal-btn {
    width: 160px;
    height: 50px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
}

.modal-btn-edu {
    background: #4a90e2;
    color: #fff;
}

.modal-btn-edu:hover {
    background: #357abd;
}

.modal-btn-grad {
    background: #5cb85c;
    color: #fff;
}

.modal-btn-grad:hover {
    background: #449d44;
}

/* ========================================
   경비과정 뱃지
======================================== */
.secret-badge {
    background: #273450;
    color: #f0f0f0;
    padding: 2px 5px;
    font-size: 11px;
    border-radius: 3px;
}

/* ========================================
   모바일에서 숨김
======================================== */
.hide-mobile {
    display: inline;
}

/* ========================================
   반응형 - 태블릿
======================================== */
@media (max-width: 768px) {
    .hide-mobile {
        display: none;
    }
    .dashboard {
        padding: 10px;
    }

    .dashboard-nav {
        flex-direction: column;
    }

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

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

    .filter-select,
    .filter-input {
        width: 100%;
    }

    .course-card {
        flex-direction: column;
        text-align: center;
    }

    .course-info {
        min-width: 100%;
    }

    .course-progress {
        border-left: none;
        border-top: 1px solid #e0e0e0;
        padding-top: 15px;
        width: 100%;
    }

    .course-action {
        width: 100%;
        text-align: center;
    }

    .course-meta {
        display: inline-flex;
        flex-wrap: wrap;
        gap: 8px 15px;
        justify-content: center;
    }

    .upcoming-card {
        flex-direction: column;
        text-align: center;
    }

    .mandatory-card {
        flex-direction: column;
        text-align: center;
    }

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

    .card-title-section {
        min-width: 100%;
    }

    .card-details {
        grid-template-columns: 1fr 1fr;
    }

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

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

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

    .payment-title {
        min-width: 100%;
    }

    .payment-details {
        grid-template-columns: 1fr 1fr;
    }

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

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

    .modal-btn {
        width: 100%;
    }
}

/* ========================================
   반응형 - 모바일
======================================== */
@media (max-width: 480px) {
    .dashboard-header {
        padding: 15px;
    }

    .dashboard-header h2 {
        font-size: 20px;
    }

    .course-card,
    .completed-card,
    .payment-card {
        padding: 15px;
    }

    .card-details,
    .payment-details {
        grid-template-columns: 1fr;
    }

    .detail-item {
        text-align: left;
        display: flex;
        justify-content: space-between;
        padding: 8px 0;
        border-bottom: 1px solid #f0f0f0;
    }

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