/* ========================================
   MODAL HỒ SƠ HỌC SINH
   File: static/css/modal.css
   ======================================== */

/* ===== OVERLAY ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ===== CONTAINER ===== */
.modal-container {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-container {
    transform: scale(1);
}

/* ===== HEADER ===== */
.modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
}

.modal-header .close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
    transition: transform 0.2s;
}

.modal-header .close-btn:hover {
    transform: scale(1.2);
}

/* ===== BODY ===== */
.modal-body {
    display: flex;
    height: calc(100% - 60px);
    overflow: hidden;
}

/* ===== SIDEBAR ===== */
.profile-sidebar {
    width: 280px;
    background: #f8f9fa;
    padding: 20px;
    border-right: 1px solid #e0e0e0;
    overflow-y: auto;
}

.profile-photo {
    width: 120px;
    height: 150px;
    margin: 0 auto;
    border-radius: 10px;
    background: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 3px solid #667eea;
}

.profile-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-photo i {
    font-size: 50px;
    color: #999;
}

.profile-quick-info {
    background: white;
    border-radius: 10px;
    padding: 15px;
    margin-top: 15px;
}

.profile-quick-info .info-row {
    margin-bottom: 12px;
}

.profile-quick-info .info-row:last-child {
    margin-bottom: 0;
}

.profile-quick-info small {
    color: #999;
    font-size: 11px;
}

.profile-quick-info .value {
    font-weight: 600;
    color: #2c3e50;
}

/* ===== TABS ===== */
.tab-headers {
    display: flex;
    background: #f0f0f0;
    border-bottom: 1px solid #ddd;
}

.tab-btn {
    flex: 1;
    padding: 12px;
    border: none;
    background: #f0f0f0;
    cursor: pointer;
    font-weight: 500;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
}

.tab-btn:hover {
    background: #e8e8e8 !important;
}

.tab-btn.active {
    background: white !important;
    border-bottom: 3px solid #667eea !important;
}

.tab-btn i {
    margin-right: 5px;
}

/* ===== TAB CONTENT ===== */
.tab-contents {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== INFO ITEMS ===== */
.info-item {
    margin-bottom: 12px;
}

.info-item label {
    display: block;
    margin-bottom: 3px;
    color: #999;
    font-size: 12px;
}

.info-item .value {
    font-weight: 500;
    color: #2c3e50;
}

/* ===== SECTION HEADERS ===== */
.section-header {
    margin: 0 0 15px;
    color: #2c3e50;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
    font-size: 16px;
}

.section-header i {
    margin-right: 8px;
    color: #667eea;
}

/* ===== STATUS BADGES ===== */
.status-badge {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.status-badge.active {
    background: #d4edda;
    color: #155724;
}

.status-badge.inactive {
    background: #f8d7da;
    color: #721c24;
}

.status-badge.graduated {
    background: #cce5ff;
    color: #004085;
}

.status-badge.suspended {
    background: #fff3cd;
    color: #856404;
}

/* ===== INFO CARDS ===== */
.info-card {
    background: #f9f9f9;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
}

.info-card.father {
    background: #e3f2fd;
}

.info-card.father h4 {
    color: #1976d2;
}

.info-card.mother {
    background: #fce4ec;
}

.info-card.mother h4 {
    color: #c2185b;
}

/* ===== STAT CARDS ===== */
.stat-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.stat-card {
    padding: 15px;
    border-radius: 10px;
    color: white;
    text-align: center;
}

.stat-card .number {
    font-size: 24px;
    font-weight: bold;
}

.stat-card .label {
    font-size: 12px;
    opacity: 0.9;
}

.stat-card.purple {
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.stat-card.green {
    background: linear-gradient(135deg, #11998e, #38ef7d);
}

.stat-card.orange {
    background: linear-gradient(135deg, #ee0979, #ff6a00);
}

.stat-card.blue {
    background: linear-gradient(135deg, #4facfe, #00f2fe);
}

/* ===== NOTE ITEMS ===== */
.note-item {
    padding: 15px;
    border-left: 4px solid #ccc;
    background: #f9f9f9;
    margin-bottom: 10px;
    border-radius: 0 10px 10px 0;
}

.note-item.general {
    border-left-color: #667eea;
}

.note-item.reward {
    border-left-color: #27ae60;
}

.note-item.discipline {
    border-left-color: #e74c3c;
}

.note-item.health {
    border-left-color: #f39c12;
}

/* ===== NOTE FILTERS ===== */
.note-filters {
    margin-bottom: 15px;
}

.note-filter {
    padding: 5px 15px;
    margin-right: 5px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
}

.note-filter:hover {
    background: #f0f0f0;
}

.note-filter.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

/* ===== CONTACT HISTORY ===== */
.contact-item {
    padding: 12px;
    border-bottom: 1px solid #eee;
    display: flex;
    gap: 10px;
}

.contact-item:last-child {
    border-bottom: none;
}

.contact-item .icon {
    font-size: 24px;
}

.contact-item .content {
    flex: 1;
}

.contact-item .meta {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

/* ===== ACTION BUTTONS ===== */
.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 15px;
}

.action-btn {
    padding: 10px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.action-btn.primary {
    background: #3498db;
    color: white;
}

.action-btn.success {
    background: #27ae60;
    color: white;
}

.action-btn.purple {
    background: #9b59b6;
    color: white;
}

.action-btn.danger {
    background: #e74c3c;
    color: white;
}

/* ===== ATTENDANCE CALENDAR ===== */
.attendance-calendar {
    background: white;
    border-radius: 10px;
    padding: 15px;
    border: 1px solid #e0e0e0;
}

.attendance-day {
    width: 40px;
    height: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    border-radius: 5px;
}

.attendance-day .day-number {
    font-size: 10px;
    color: #666;
}

/* ===== GRADES TABLE ===== */
.grades-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.grades-table th,
.grades-table td {
    padding: 10px;
    border: 1px solid #ddd;
    text-align: center;
}

.grades-table th {
    background: #f5f5f5;
    font-weight: 600;
}

.grades-table td:first-child {
    text-align: left;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    .modal-container {
        width: 95% !important;
        height: 95% !important;
    }

    .modal-body {
        flex-direction: column;
    }

    .profile-sidebar {
        width: 100%;
        max-height: 200px;
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
    }

    .tab-btn {
        padding: 10px 5px;
        font-size: 12px;
    }

    .tab-btn i {
        display: block;
        margin: 0 0 3px 0;
    }
}