/* =================================================
   신규 로그인/조회 UI (학부모/교사 공통)
================================================= */
.epx-login-container {
    max-width: 1100px; /* 너비 통일 */
    margin: 60px auto;
    padding: 20px;
}

.epx-login-card {
    max-width: 800px; /* 카드의 실제 너비는 더 작게 유지 */
    margin: 0 auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
    overflow: hidden;
    text-align: center;
}

.epx-login-content {
    padding: 40px 50px;
}

.epx-login-content h2 {
    font-size: 28px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 10px;
}

.epx-login-content p {
    font-size: 16px;
    color: #555;
    line-height: 1.7;
    margin: 0 0 30px;
}

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

.epx-login-form input[type="text"] {
    width: 100%;
    height: 52px;
    padding: 0 20px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 16px;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.epx-login-form input[type="text"]:focus {
    outline: none;
    border-color: #005aab;
    box-shadow: 0 0 0 3px rgba(0, 90, 171, 0.2);
}

.epx-button {
    display: inline-block;
    width: 100%;
    height: 52px;
    padding: 0 40px;
    border: none; 
    background-color: #005aab; 
    color: white; 
    border-radius: 8px; 
    cursor: pointer; 
    font-size: 16px; 
    font-weight: bold; 
    box-sizing: border-box; 
    transition: background-color 0.2s;
    text-decoration: none;
    line-height: 52px;
}

.epx-button:hover { 
    background-color: #004a8d;
}

.epx-login-footer {
    margin-top: 25px;
    border-top: 1px solid #eee;
    padding-top: 20px;
}

.epx-login-footer p {
    font-size: 14px;
    color: #777;
    margin: 0;
}

.epx-login-error {
    margin-top: 15px;
    color: #d9534f;
    font-weight: 600;
}

.epx-error-card {
    padding: 40px;
    text-align: center;
}
.epx-error-card h3 {
    margin-top: 0;
}

/* =================================================
   학부모 페이지 대시보드
================================================= */
body { background-color: #f9f9f9; }

.epx-parent-dashboard { 
    max-width: 1100px; /* 너비 통일 */
    margin: 40px auto; 
    font-family: sans-serif; 
    color: #333; 
    padding: 15px; 
    background: #fff; 
    border: 1px solid #e0e0e0; 
}
.epx-student-name-header { font-size: 60px; font-weight: bold; text-align: center; margin: 40px 0; color: #2c3e50; line-height: 1.2; }
.epx-student-info { text-align: center; margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid #eee; }
.epx-student-info span { margin: 0 8px; font-size: 15px; color: #555; display: inline-block; vertical-align: middle; }
.epx-student-info .divider { color: #ccc; }
.epx-guide-box { background-color: #f9f9f9; border: 1px solid #e5e5e5; border-radius: 8px; padding: 20px; margin: 30px 0; font-size: 14px; line-height: 1.8; color: #444; }
.epx-guide-box h4 { margin-top: 0; margin-bottom: 15px; font-size: 16px; font-weight: bold; color: #2c3e50; }
.epx-guide-box p { margin: 0; }
.epx-guide-box p small { color: #777; font-size: 13px; }
.epx-student-info .status-indicator { font-weight: bold; }
.epx-student-info .status-icon { font-size: 1.3em; vertical-align: middle; line-height: 1; }
.epx-student-info .status-icon.status-enrolled { color: #28a745; }
.epx-student-info .status-icon.status-on-leave { color: #ffc107; }
.epx-student-info .status-icon.status-terminated { color: #dc3545; }
.epx-section-title { text-align: center; margin: 30px 0; }
.epx-section-title h2 { font-size: 24px; font-weight: 600; color: #333; display: inline-block; padding-bottom: 5px; border-bottom: 2px solid #005aab; }
.epx-summary-grid-8 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 30px; }
.epx-summary-box { background-color: #fff; border: 1px solid #e0e0e0; border-radius: 12px; padding: 20px; text-align: center; box-shadow: 0 2px 4px rgba(0,0,0,0.05); }
.epx-summary-box .title { font-size: 15px; font-weight: 600; color: #666; margin-bottom: 10px; }
.epx-summary-box .value { font-size: 32px; font-weight: 700; color: #005aab; }
.epx-summary-box .value span { font-size: 18px; margin-left: 2px; }
.epx-summary-box .value.attitude-우수 { color: #28a745; }
.epx-summary-box .value.attitude-양호 { color: #17a2b8; }
.epx-summary-box .value.attitude-불량 { color: #dc3545; }
.epx-ai-section { margin: 40px 0; }
.epx-ai-content-box {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    font-size: 15px;
    line-height: 1.8;
    color: #343a40;
}
.epx-ai-content-inner { padding: 25px; }
.epx-ai-content-box .ai-summary-content {
    margin-bottom: 25px;
}
.epx-ai-content-box .ai-download-action {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px dashed #ced4da;
}
.epx-ai-content-box .ai-download-action .epx-button {
    width: auto;
    padding: 0 30px;
    height: 48px;
    line-height: 48px;
    font-size: 15px;
}
.epx-detail-section h2 { font-size: 22px; margin-bottom: 15px; border-bottom: 2px solid #eee; padding-bottom: 10px; }
.epx-parent-dashboard .epx-detail-table-pc { width: 100%; border-collapse: collapse; font-size: 14px; table-layout: fixed; border-spacing: 0; margin-top: 20px; }
.epx-parent-dashboard .epx-detail-table-pc th, 
.epx-parent-dashboard .epx-detail-table-pc td { border: 1px solid #ddd !important; padding: 12px 8px !important; text-align: center; vertical-align: middle; word-break: break-all; }
.epx-parent-dashboard .epx-detail-table-pc thead th { background-color: #f8f9fa; font-weight: 600; }
.epx-parent-dashboard .epx-detail-table-pc tbody tr:nth-child(even) { background-color: #f9f9f9; }
.epx-parent-dashboard .epx-detail-table-pc td.comment-cell { text-align: left; white-space: pre-wrap; word-break: break-word; }

.epx-detail-table-pc .col-date { width: 10%; }
.epx-detail-table-pc .col-unit { width: 10%; }
.epx-detail-table-pc .col-ct-q { width: 5%; }
.epx-detail-table-pc .col-ct-a { width: 5%; }
.epx-detail-table-pc .col-achieve { width: 6%; }
.epx-detail-table-pc .col-comp { width: 6%; }
.epx-detail-table-pc .col-hw { width: 5%; }
.epx-detail-table-pc .col-att { width: 5%; }
.epx-detail-table-pc .col-comment { width: 48%; }

.epx-table-wrapper-mobile { display: none; }
.epx-mobile-card-hidden { display: none; }
.epx-load-more-wrapper { text-align: center; margin-top: 20px; }
.epx-load-more-wrapper .button { background-color: #6c757d; border-color: #6c757d; padding: 12px 0; width: 100%; font-size: 16px; font-weight: bold; }
.epx-load-more-wrapper .button:hover { background-color: #5a6268; }

.epx-graph-section {
    margin-bottom: 40px;
}
.epx-graph-container {
    width: 95%;
    margin: 0 auto;
    height: 400px;
    padding: 20px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* =================================================
   학부모 페이지 필터 및 신규 UI
================================================= */

/* --- 상단 액션 버튼 --- */
.epx-top-actions {
    margin-top: 20px;
    margin-bottom: 20px;
    text-align: right;
}
.epx-button-secondary {
    display: inline-block;
    height: 44px;
    line-height: 44px;
    padding: 0 25px;
    border: 1px solid #005aab;
    background-color: #fff;
    color: #005aab;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.2s;
}
.epx-button-secondary:hover {
    background-color: #f0f6fa;
    color: #004a8d;
}

/* --- 필터 전체 컨테이너 --- */
.epx-filters-container {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 25px 30px;
    margin-bottom: 40px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

/* --- 필터 요소들을 감싸는 그리드 --- */
.epx-filter-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr) auto;
    gap: 20px;
    align-items: flex-end;
}
.epx-filter-item label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #495057;
    font-size: 14px;
}
.epx-filters-container select,
.epx-filters-container input[type="date"] {
    width: 100%;
    height: 44px;
    padding: 0 12px;
    border-radius: 6px;
    border: 1px solid #ced4da;
    background-color: #fff;
    font-size: 15px;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.epx-filters-container select:focus,
.epx-filters-container input[type="date"]:focus {
    outline: none;
    border-color: #005aab;
    box-shadow: 0 0 0 3px rgba(0, 90, 171, 0.15);
}
.date-range-wrapper { display: flex; align-items: center; gap: 8px; }
.date-range-wrapper span { color: #6c757d; }
.epx-filter-item-submit .epx-button {
    width: 100%;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    font-weight: 600;
}

/* --- AI 분석 컨트롤 --- */
.epx-ai-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
    margin-bottom: 25px;
}
#epx-ai-usage-counter { font-size: 14px; color: #555; font-weight: 500; }
.epx-toggle-switch { position: relative; display: inline-block; width: 50px; height: 28px; }
.epx-toggle-switch input { opacity: 0; width: 0; height: 0; }
.epx-slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #ccc; transition: .4s; border-radius: 28px; }
.epx-slider:before { position: absolute; content: ""; height: 20px; width: 20px; left: 4px; bottom: 4px; background-color: white; transition: .4s; border-radius: 50%; }
input:checked + .epx-slider { background-color: #005aab; }
input:checked + .epx-slider:before { transform: translateX(22px); }

/* --- 모달 (팝업) 스타일 --- */
.epx-modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); z-index: 1000; display: flex; align-items: center; justify-content: center; }
.epx-modal-content { background: #fff; padding: 30px 40px; border-radius: 8px; width: 90%; max-width: 800px; max-height: 90vh; overflow-y: auto; position: relative; }
.epx-modal-close { position: absolute; top: 15px; right: 20px; background: none; border: none; font-size: 28px; cursor: pointer; color: #888; }
.epx-modal-report-header h3 { margin-top: 0; }
.epx-report-list { list-style: none; padding: 0; margin: 0; }
.epx-report-list-item { display: block; padding: 15px; border-bottom: 1px solid #eee; text-decoration: none; color: #333; transition: background-color 0.2s; cursor: pointer; }
.epx-report-list-item:hover { background-color: #f5f5f5; }
.epx-report-list-item strong { font-size: 1.1em; }
.epx-report-list-item span { margin-left: 10px; font-size: 0.9em; color: #777; }
.epx-modal-report-body h4 { margin-top: 25px; border-bottom: 1px solid #eee; padding-bottom: 8px; }

/* =================================================
   반응형 스타일
================================================= */
@media (max-width: 768px) {
    .epx-parent-dashboard, .epx-teacher-dashboard-wrap { border: none; }
    .epx-login-container { margin: 30px auto; padding: 0 15px; }
    .epx-login-card { box-shadow: 0 4px 15px rgba(0,0,0,0.05); }
    .epx-login-content { padding: 30px 25px; }
    .epx-login-content h2 { font-size: 24px; }
    .epx-login-content p { font-size: 15px; margin-bottom: 25px; }
    .epx-student-name-header { font-size: 48px; margin: 25px 0; }
    .epx-student-info { display: flex; flex-direction: column; gap: 5px; }
    .epx-student-info span.divider { display: none; }
    .epx-summary-grid-8 { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .epx-detail-table-pc { display: none; }
    .epx-table-wrapper-mobile { display: block; }
    .epx-mobile-card { background: #fff; border: 1px solid #ddd; border-radius: 8px; font-size: 14px; margin-bottom: 15px; }
    .epx-mobile-card .card-header { background: #f8f9fa; padding: 10px 15px; font-weight: bold; border-bottom: 1px solid #ddd; }
    .epx-mobile-card .card-body { padding: 15px; display: flex; flex-direction: column; gap: 8px; }
    .epx-mobile-card .card-body p { margin: 0; line-height: 1.6; display: flex; justify-content: space-between; align-items: baseline; }
    .epx-mobile-card .card-body p.comment-p { flex-direction: column; align-items: flex-start; white-space: pre-wrap; word-break: break-word; }
    .epx-mobile-card .card-body p strong { color: #555; padding-right: 10px; flex-shrink: 0; }
    .epx-graph-container { height: 300px; padding: 10px; }
    .epx-filter-grid { grid-template-columns: 1fr; gap: 15px; }
    .epx-filter-item, .epx-filter-item-submit { width: 100%; }
    .epx-ai-controls { flex-direction: column; gap: 10px; }
}