/* ========================================
   ELearning LMS - App Overrides
   Loaded AFTER original BVU CSS files
   Only contains overrides & additions
   ======================================== */

/* === RESET === */
*, *::before, *::after { box-sizing: border-box; }
body {
    font-family: 'Segoe UI', Tahoma, sans-serif !important;
    font-size: 13px;
    color: #333;
}

/* === FLASH ALERTS === */
.flash-message { margin-bottom: 16px; }
.flash-message .alert { border-radius: 8px; padding: 12px 16px; font-size: 13px; }

/* === TABLE CUSTOM (admin/teacher) === */
#table-color .table-custom { border-radius: 8px; overflow: hidden; }
#table-color .table-custom thead {
    background: #384289;
    color: #ffffff;
    white-space: nowrap;
}
#table-color .table-custom thead th {
    border: 1px solid #384289;
    padding: 10px 12px;
    font-size: 12px;
    font-weight: 600;
}
#table-color .table-custom tbody tr:nth-child(odd) { background: #f8f9fa; }
#table-color .table-custom tbody tr:nth-child(even) { background: #fff; }
#table-color .table-custom tbody td {
    border: 1px solid #eee;
    padding: 8px 12px;
    font-size: 13px;
    vertical-align: middle;
}

/* === BUTTONS === */
.btn-action {
    background-color: #384289;
    color: #fff;
    border-radius: 6px !important;
    border: none;
    padding: 7px 16px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-action:hover {
    background-color: #2d3570 !important;
    color: #fff;
}

/* === PAGINATION === */
.pagination { gap: 4px; }
.pagination .page-link { color: #384289; font-size: 12px; border-radius: 6px; padding: 6px 12px; }
.pagination .page-item.active .page-link {
    background-color: #384289;
    border-color: #384289;
    color: #fff;
}

/* === MODAL === */
.modal-content { border-radius: 12px; overflow: hidden; border: none; box-shadow: 0 8px 32px rgba(0,0,0,0.15); }
.modal-header { background: #384289; color: #fff; padding: 16px 20px; }
.modal-header .btn-close { filter: brightness(0) invert(1); }
.modal-title { font-size: 15px; font-weight: 600; }
.modal-body { padding: 20px; }
.modal-footer { padding: 12px 20px; border-top: 1px solid #f0f0f0; }

/* === SCHEDULE GRID === */
.schedule-grid { border-collapse: collapse; width: 100%; border-radius: 8px; overflow: hidden; }
.schedule-grid th, .schedule-grid td {
    border: 1px solid #e0e0e0;
    padding: 6px;
    text-align: center;
    font-size: 12px;
    vertical-align: top;
    height: 70px;
}
.schedule-grid th { background: #384289; color: #fff; height: auto; font-weight: 600; padding: 10px 6px; }
.schedule-item {
    background: #e8eaf6;
    border-left: 3px solid #384289;
    padding: 6px 8px;
    border-radius: 6px;
    font-size: 11px;
    margin-bottom: 3px;
}
.schedule-item.exam {
    background: #fff8e1;
    border-left-color: #f5a623;
}

/* === PROGRESS CIRCLE === */
.progress-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: conic-gradient(#384289 var(--progress, 0%), #e7ecf0 0%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}
.progress-value {
    font-size: 24px;
    font-weight: 700;
    color: #384289;
}

/* === MESSAGES === */
.message-row { transition: background 0.15s; border-radius: 6px; }
.message-row:hover { background: #f5f7fa; }
.message-thread-item {
    background: #f7f8fb;
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 10px;
}
.message-thread-item.own {
    background: #e8eaf6;
    margin-left: 40px;
}

/* === STAT BOX (admin) === */
.stat-box {
    border-radius: 12px;
    padding: 22px 20px;
    color: #fff;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.stat-box .stat-number { font-size: 32px; font-weight: 700; }
.stat-box .stat-label { font-size: 12px; opacity: 0.9; }
.stat-box.bg-primary-custom { background: linear-gradient(135deg, #384289, #5a6abf); }
.stat-box.bg-success-custom { background: linear-gradient(135deg, #27ae60, #2ecc71); }
.stat-box.bg-warning-custom { background: linear-gradient(135deg, #f39c12, #f1c40f); }
.stat-box.bg-info-custom { background: linear-gradient(135deg, #2980b9, #3498db); }
.stat-box.bg-danger-custom { background: linear-gradient(135deg, #c0392b, #e74c3c); }

/* === CARDS & PANELS (Student) === */
.card { border-radius: 10px; border: 1px solid #e8e8e8; box-shadow: 0 1px 4px rgba(0,0,0,0.06); }
.card-header { padding: 14px 20px; font-size: 14px; font-weight: 600; border-bottom: 1px solid #f0f0f0; }
.card-body { padding: 20px; }

/* === FORMS (Global) === */
.form-control { border-radius: 6px; border: 1px solid #ddd; padding: 8px 12px; font-size: 13px; transition: border-color 0.2s, box-shadow 0.2s; }
.form-control:focus { border-color: #384289; box-shadow: 0 0 0 3px rgba(56,66,137,0.1); outline: none; }
.form-select { border-radius: 6px; border: 1px solid #ddd; padding: 8px 12px; font-size: 13px; }
.form-select:focus { border-color: #384289; box-shadow: 0 0 0 3px rgba(56,66,137,0.1); }
.form-label { font-size: 13px; font-weight: 500; color: #444; margin-bottom: 4px; }

/* === BUTTONS (Global) === */
.btn { border-radius: 6px; font-size: 13px; padding: 7px 16px; font-weight: 500; transition: all 0.2s; }
.btn-sm { padding: 5px 10px; font-size: 12px; border-radius: 5px; }
.btn-primary { background: #384289; border-color: #384289; }
.btn-primary:hover { background: #2d3570; border-color: #2d3570; }
.btn-outline-primary { color: #384289; border-color: #384289; }
.btn-outline-primary:hover { background: #384289; color: #fff; }

/* === BADGES === */
.badge { font-size: 11px; font-weight: 500; padding: 4px 8px; border-radius: 4px; }

/* === ALERTS (Global) === */
.alert { border-radius: 8px; font-size: 13px; padding: 12px 16px; }

/* === TABS === */
.nav-tabs { border-bottom: 2px solid #e8e8e8; }
.nav-tabs .nav-link { color: #666; font-size: 13px; padding: 10px 18px; border: none; border-bottom: 2px solid transparent; margin-bottom: -2px; border-radius: 0; }
.nav-tabs .nav-link:hover { color: #384289; border-bottom-color: #ccc; }
.nav-tabs .nav-link.active { color: #384289; font-weight: 600; border-bottom-color: #384289; background: transparent; }

/* === TABLES (Global) === */
.table { font-size: 13px; }
.table thead th { font-weight: 600; font-size: 12px; padding: 10px 12px; vertical-align: middle; }
.table tbody td { padding: 8px 12px; vertical-align: middle; }
.table-bordered { border-radius: 8px; overflow: hidden; }

/* === UTILITIES === */
.text-primary-custom { color: #384289 !important; }
.pointer { cursor: pointer; }
.fs-12 { font-size: 12px; }
.fs-13 { font-size: 13px; }

/* === PRINT === */
@media print {
    .header, .accordion-menu, .menu-btn, .sidebar, .btn, .no-print,
    .pagination, .search-bar, form:not(.print-keep), .alert { display: none !important; }
    .main-content, .content-area, .dashboard-box { margin: 0 !important; padding: 10px !important; box-shadow: none !important; border: none !important; }
    body { font-size: 12px !important; color: #000 !important; background: #fff !important; }
    table { font-size: 11px !important; border-collapse: collapse !important; }
    table th, table td { border: 1px solid #333 !important; padding: 4px 6px !important; }
    .print-header { display: block !important; text-align: center; margin-bottom: 15px; }
    .print-header h3 { margin: 0; font-size: 16px; }
    .print-header p { margin: 2px 0; font-size: 12px; color: #666; }
    a { text-decoration: none !important; color: #000 !important; }
}
.print-header { display: none; }
.btn-print { cursor: pointer; }
