/* 수강신청 시스템 스타일 */

/* 기본 컨테이너 */
.course-container {
    max-width: 1260px;
    margin: 40px auto;
    padding: 0 20px;
}

.course-card {
    background: #fff;
    padding: 30px;
    margin-bottom: 20px;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

/* 제목 스타일 */
.course-title {
    font-size: 28px;
    font-weight: bold;
    color: #1e5799;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #1e5799;
}

.course-subtitle {
    font-size: 20px;
    font-weight: bold;
    color: #333;
    margin: 20px 0 15px 0;
}

.course-section-title {
    font-size: 16px;
    font-weight: bold;
    color: #1e5799;
    margin: 25px 0 10px 0;
    padding: 8px 12px;
    background: #f0f5ff;
    border-left: 4px solid #1e5799;
    border-radius: 0 4px 4px 0;
}

/* 헤더 */
.course-header {
    text-align: center;
    margin-bottom: 25px;
    position: relative;
}

.course-logo {
    height: 60px;
    margin-bottom: 10px;
}

/* 정보 박스 */
.course-info-box {
    background: #f8f9fa;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #1e5799;
}

.course-info-box p {
    margin: 5px 0;
    color: #555;
}

/* 폼 스타일 */
.course-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.course-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.course-field-row {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.course-field-row .course-field {
    flex: 1;
    min-width: 200px;
}

.course-label {
    font-weight: 600;
    color: #333;
    font-size: 15px;
}

.course-label.required::after,
th.required::after {
    content: " *";
    color: #e74c3c;
}

/* 입력 필드 */
.course-input,
.course-select,
.course-textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 15px;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #fff;
}

.course-input:focus,
.course-select:focus,
.course-textarea:focus {
    outline: none;
    border-color: #1e5799;
    box-shadow: 0 0 0 3px rgba(30,87,153,0.1);
}

.course-input-inline {
    width: auto;
    min-width: 120px;
    display: inline-block;
}

.course-textarea {
    min-height: 100px;
    resize: vertical;
    font-family: inherit;
}

/* 라디오, 체크박스 */
.course-radio,
.course-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-right: 15px;
    cursor: pointer;
    font-size: 14px;
}

.course-radio input,
.course-checkbox input {
    cursor: pointer;
}

/* 버튼 */
.course-btn {
    padding: 12px 30px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.course-btn-sm {
    padding: 6px 14px;
    font-size: 13px;
}

.course-btn-primary {
    background-color: #1e5799 !important;
    color: #fff !important;
}

.course-btn-primary:hover {
    background-color: #164073 !important;
}

.course-btn-secondary {
    background-color: #6c757d !important;
    color: #fff !important;
}

.course-btn-secondary:hover {
    background-color: #545b62 !important;
}

.course-btn-success {
    background-color: #28a745 !important;
    color: #fff !important;
}

.course-btn-success:hover {
    background-color: #218838 !important;
}

.course-btn-danger {
    background-color: #dc3545 !important;
    color: #fff !important;
}

.course-btn-danger:hover {
    background-color: #c82333 !important;
}

.course-btn-info {
    background-color: #17a2b8 !important;
    color: #fff !important;
}

.course-btn-info:hover {
    background-color: #138496 !important;
}

.course-btn-warning {
    background-color: #ffc107 !important;
    color: #212529 !important;
}

.course-btn-warning:hover {
    background-color: #e0a800 !important;
}

/* 액션 버튼 영역 */
.course-actions {
    display: flex;
    gap: 10px;
    margin-top: 25px;
    justify-content: center;
    flex-wrap: wrap;
}

/* 테이블 */
.course-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.course-table th,
.course-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
    font-size: 14px;
}

.course-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
}

.course-table tbody tr:hover {
    background-color: #f8f9fa;
}

.course-table .text-center {
    text-align: center;
}

.course-table .text-right {
    text-align: right;
}

.course-table .text-nowrap {
    white-space: nowrap;
}

/* 폼 테이블 */
.course-form-table {
    margin-bottom: 15px;
}

.form-table {
    width: 100%;
    border-collapse: collapse;
}

.form-table th,
.form-table td {
    border: 1px solid #ddd;
    padding: 10px 12px;
    font-size: 14px;
    vertical-align: middle;
}

.form-table th {
    background-color: #f5f7fa;
    font-weight: 600;
    text-align: center;
    width: 120px;
    color: #333;
}

.form-table th small {
    display: block;
    font-weight: normal;
    font-size: 11px;
    color: #666;
}

/* 할인 섹션 */
.discount-section {
    background: #fffbf0;
    vertical-align: top;
    padding: 12px;
    font-size: 13px;
}

/* 할인사유 라디오 버튼 그룹 */
.discount-radio-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}

.discount-radio-label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    cursor: pointer;
    line-height: 1.4;
    padding: 4px 0;
}

.discount-radio-label input[type="radio"] {
    margin-top: 3px;
    flex-shrink: 0;
    cursor: pointer;
}

/* 주소 입력 */
.address-wrap {
    display: flex;
    gap: 10px;
}

.address-wrap .course-input {
    flex: 1;
}

/* 현금영수증, 통학수단 필드 */
.receipt-field,
.transport-field {
    font-size: 13px;
    color: #666;
}

/* 개인정보 동의 박스 */
.privacy-box {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.privacy-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
    margin-bottom: 10px;
}

.privacy-table th,
.privacy-table td {
    border: 1px solid #ccc;
    padding: 6px 8px;
    text-align: center;
    vertical-align: middle;
}

.privacy-table th {
    background-color: #e8e8e8;
    font-weight: 600;
}

.privacy-agree-wrap {
    text-align: center;
    margin: 15px 0;
}

.privacy-notice {
    font-size: 12px;
    color: #666;
    line-height: 1.5;
}

/* 신청 요약 */
.apply-summary {
    text-align: center;
    margin-top: 25px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.apply-summary p {
    margin: 8px 0;
}

.apply-date {
    font-size: 16px;
    margin-top: 15px;
}

.apply-target {
    font-weight: bold;
    margin-top: 20px;
}

.apply-signature {
    text-align: right;
    font-size: 16px;
    margin-top: 15px;
}

/* 수강료 요약 */
.course-fee-summary {
    margin-top: 20px;
    text-align: right;
}

.fee-table {
    display: inline-block;
    border-collapse: collapse;
}

.fee-table th,
.fee-table td {
    border: 1px solid #ddd;
    padding: 10px 20px;
    font-size: 15px;
}

.fee-table th {
    background-color: #f5f7fa;
    font-weight: 600;
}

.fee-table .total-row th,
.fee-table .total-row td {
    background-color: #1e5799;
    color: #fff;
    font-weight: bold;
    font-size: 17px;
}

/* 자동생성 텍스트 */
.auto-generate {
    color: #999;
    font-style: italic;
}

/* 파일 업로드 */
.course-input-file {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    width: 100%;
    font-size: 14px;
}

.course-input-file:focus {
    outline: none;
    border-color: #1e5799;
}

.file-notice {
    font-size: 12px;
    color: #888;
    margin-top: 5px;
}

/* 알림 박스 */
.course-alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.course-alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.course-alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.course-alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.course-alert-warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

/* 배지 */
.course-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.course-badge-primary {
    background-color: #1e5799;
    color: #fff;
}

.course-badge-success {
    background-color: #28a745;
    color: #fff;
}

.course-badge-danger {
    background-color: #dc3545;
    color: #fff;
}

.course-badge-warning {
    background-color: #ffc107;
    color: #212529;
}

.course-badge-secondary {
    background-color: #6c757d;
    color: #fff;
}

/* 상태별 배지 */
.status-pending {
    background-color: #ffc107;
    color: #212529;
}

.status-approved {
    background-color: #28a745;
    color: #fff;
}

.status-rejected {
    background-color: #dc3545;
    color: #fff;
}

.status-cancelled {
    background-color: #6c757d;
    color: #fff;
}

/* 결과 영역 */
.course-result {
    margin-top: 20px;
}

/* 유틸리티 */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mt-10 {
    margin-top: 10px;
}

.mt-20 {
    margin-top: 20px;
}

.mb-10 {
    margin-bottom: 10px;
}

.mb-20 {
    margin-bottom: 20px;
}

/* 인쇄용 스타일 */
@media print {
    body {
        background: #fff;
    }

    .course-container {
        max-width: 100%;
        margin: 0;
        padding: 0;
    }

    .course-card {
        box-shadow: none;
        padding: 15px;
    }

    .course-actions,
    .no-print {
        display: none !important;
    }

    .course-table {
        page-break-inside: avoid;
    }
}

/* 반응형 - 태블릿 */
@media (max-width: 992px) {
    .course-container {
        padding: 0 15px;
        margin: 20px auto;
    }

    .course-card {
        padding: 20px;
    }

    .course-title {
        font-size: 24px;
    }

    .form-table th {
        width: 100px;
    }
}

/* 반응형 - 모바일 */
@media (max-width: 768px) {
    .course-container {
        padding: 0 10px;
        margin: 15px auto;
    }

    .course-card {
        padding: 15px;
        border-radius: 12px;
    }

    .course-title {
        font-size: 20px;
        padding-bottom: 10px;
    }

    .course-subtitle {
        font-size: 17px;
    }

    .course-field-row {
        flex-direction: column;
        gap: 15px;
    }

    .course-field-row .course-field {
        min-width: 100%;
    }

    .course-actions {
        flex-direction: column;
    }

    .course-btn {
        width: 100%;
    }

    .course-table {
        font-size: 13px;
    }

    .course-table th,
    .course-table td {
        padding: 8px;
    }

    .form-table th,
    .form-table td {
        display: block;
        width: 100%;
    }

    .form-table th {
        border-bottom: none;
    }

    .form-table td {
        border-top: none;
    }

    .discount-section {
        display: block;
        width: 100%;
    }

    .address-wrap {
        flex-direction: column;
    }

    .privacy-table {
        font-size: 10px;
    }

    .fee-table {
        width: 100%;
    }

    .course-fee-summary {
        text-align: center;
    }

    .course-radio,
    .course-checkbox {
        display: flex;
        margin-bottom: 8px;
    }

    .receipt-field,
    .transport-field {
        display: block;
        margin-top: 5px;
    }
}

/* 반응형 테이블 (스크롤) */
@media (max-width: 576px) {
    .course-table-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .course-table {
        min-width: 600px;
    }
}
