/* style_student.css */

/* 전체 화면을 꽉 채우는 1단 레이아웃 */
.full-panel {
    width: 100%;
    background-color: var(--bg-color);
    padding: 25px 40px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

/* 상단 검색 및 추가 버튼 영역 */
.student-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.search-group {
    display: flex;
    gap: 10px;
    width: 300px;
}

.search-group input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
}

.btn-add {
    background-color: var(--primary-color);
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}
.btn-add:hover { background-color: var(--primary-hover); }

/* 학생 목록 테이블 영역 */
.table-card-full {
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    flex: 1;
    overflow: hidden; /* 모서리 둥글게 깎기 위해 */
    display: flex;
    flex-direction: column;
}

.table-wrapper-full {
    overflow-y: auto;
    flex: 1;
}

.student-table {
    width: 100%;
    border-collapse: collapse;
    text-align: center;
    font-size: 14px;
}

.student-table th {
    position: sticky;
    top: 0;
    background-color: var(--header-bg);
    padding: 15px;
    font-weight: 600;
    color: #475569;
    border-bottom: 1px solid var(--border-color);
    z-index: 2;
}

.student-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #f1f5f9;
    color: var(--text-main);
    vertical-align: middle;
}

.student-table tbody tr {
    transition: 0.2s;
}

.student-table tbody tr:hover {
    background-color: #f8fafc;
}

/* 상태 뱃지 */
.badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}
.badge.active { background-color: #dcfce7; color: #166534; } /* 재원 */
.badge.pause { background-color: #fef9c3; color: #854d0e; } /* 휴원 */
.badge.quit { background-color: #fee2e2; color: #991b1b; } /* 퇴원 */

/* 관리 버튼 */
.btn-manage {
    padding: 6px 12px;
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    color: #475569;
}
.btn-manage:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* =========================================
   [모달(팝업) 스타일]
========================================= */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    visibility: hidden;
    opacity: 0;
    transition: 0.2s;
}

.modal-overlay.show {
    visibility: visible;
    opacity: 1;
}

.modal-content {
    background: white;
    width: 500px;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    transform: translateY(20px);
    transition: 0.3s ease-out;
}

.modal-overlay.show .modal-content {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-header h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-main);
}

.btn-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #94a3b8;
}

.modal-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 25px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.input-group.full-width {
    grid-column: span 2;
}

.input-group label {
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
}

.input-group input, .input-group select {
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.btn-modal {
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    border: none;
}

.btn-cancel { background: #f1f5f9; color: #475569; }
.btn-save-modal { background: var(--primary-color); color: white; }
.btn-delete { background: white; border: 1px solid #ef4444; color: #ef4444; margin-right: auto; }
.btn-delete:hover { background: #fef2f2; }