/* --- FONTS --- */
@import url(https://fonts.googleapis.com/css?family=Open+Sans:400,700,800);
@import url(https://fonts.googleapis.com/css?family=Lato:400,700,900);
@import url(https://maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css);

/* --- GENERAL --- */
body, html { height: 100%; }
body {
    font-family: 'Lato','Open Sans', Helvetica, sans-serif;
    color: white;
}

/* --- HOME SECTION --- */
.home {
    position: relative;
    background-color: rgb(0, 102, 102);
    height: 70%;
}

.dataTables_filter input { width: auto !important; display: inline-block !important; }

/* Adjust the 100px based on how tall your menu actually is */
.banner-wrapper {
    padding-top: 50px; 
    background-color: #ffffff; /* Matches your banner background */
}

/* Ensure the image doesn't have extra unwanted top padding */
.banner_image {
    padding-top: 10px;
}

.banner {
    padding-top: 0px !important; /* Resetting your previous 50px if needed */
}


/* --- CONTACT SECTION --- */
.holder { background-color: #bebfbf; padding: 50px 0; }
.child { margin: 0 10% !important; }

.contact-page-form h2 {
    color: #071c34;
    text-transform: capitalize;
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 20px;
    border-bottom: 2px solid #28a745; /* Green underline */
    display: inline-block;
}

.contact-page-form input, .contact-page-form select {
    background: #ffffff !important;
    border: 1px solid #d1d5db !important;
    margin-bottom: 20px;
    padding: 12px 16px;
    width: 100%;
    border-radius: 6px;
    color: #333;
}

/* --- THE CENTERED GREEN BUTTON --- */
.single-input-fieldsbtn {
    width: 100%;
    display: flex;
    justify-content: center; /* Ensures content inside is centered */
}

#copy_val {
    background: #28a745 !important; /* Success Green */
    color: #ffffff !important;
    font-weight: 700 !important;
    padding: 12px 40px !important;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 8px !important;
    border: none !important;
    cursor: pointer;
    width: auto !important; /* Small button */
    min-width: 180px; /* Decent width */
    box-shadow: 0 4px 6px rgba(0,0,0,0.15) !important;
    transition: all 0.3s ease !important;
}

#copy_val:hover {
    background: #218838 !important; /* Darker Green */
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.2) !important;
}

#copy_val:active {
    transform: translateY(0);
}

/* --- UTILITIES --- */
.mt-3 { margin-top: 1rem !important; }
.d-flex { display: flex !important; }
.justify-content-center { justify-content: center !important; }

/* Responsive adjustments */
@media (max-width: 767px) {
    .child { margin: 0 5% !important; }
    #copy_val { width: 100% !important; } /* Full width on mobile for usability */
}

/* NAVBAR CSS */
    /* Navbar Link Styling */
    .navbar-nav .nav-link {
        color: #64748b !important; /* Slate gray */
        font-weight: 500;
        padding: 0.5rem 1rem !important;
        margin: 0 0.2rem;
        transition: all 0.3s ease;
        position: relative;
    }

    /* Hover State */
    .navbar-nav .nav-link:hover {
        color: #3b82f6 !important; /* Bright Blue */
    }

    /* Active State (The current page) */
    .navbar-nav .nav-link.active {
        color: #3b82f6 !important;
        font-weight: 700;
    }

    /* Modern underline effect for active link */
    .navbar-nav .nav-link.active::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 1rem;
        right: 1rem;
        height: 3px;
        background: #3b82f6;
        border-radius: 10px;
    }

    /* Button Styling */
    .btn-primary {
        background-color: #3b82f6;
        border: none;
        transition: transform 0.2s;
    }

    .btn-primary:hover {
        background-color: #2563eb;
        transform: translateY(-2px);
    }

    .btn-outline-primary {
        border: 2px solid #3b82f6;
        color: #3b82f6;
        font-weight: 600;
    }
    
    /* Logo spacing */
    .navbar-brand img {
        transition: transform 0.3s;
    }
    .navbar-brand:hover img {
        transform: rotate(10deg) scale(1.1);
    }
/* END OF NAVBAR CSS */

/* Downloadable forms CSS */
    .table-card {
        border-radius: 15px;
        border: none;
        overflow: hidden;
    }
    #datatable thead {
        background-color: #f8fafc;
    }
    #datatable thead th {
        font-size: 12px;
        text-transform: uppercase;
        letter-spacing: 1px;
        color: #64748b;
        padding: 15px;
    }
    #datatable tbody td {
        padding: 15px;
        vertical-align: middle;
    }
    .btn-success {
        background-color: #04AA6D;
        border: none;
        font-weight: 600;
        transition: 0.3s;
    }
    .btn-success:hover {
        background-color: #038d5a;
        transform: translateY(-1px);
    }
/* End of Downloadable forms CSS */

#reading_materials_fields {
    margin-top: 10px;
    margin-bottom: 10px;
}

/* Reading Materials CSS */
    /* Container Grid */
    .stats-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 20px;
        padding: 20px 0;
    }

    /* Link Wrapper Removal */
    .stat-link {
        text-decoration: none !important;
        display: block;
    }

    /* Base Card Styling */
    .stat-card {
        position: relative;
        padding: 25px;
        border-radius: 15px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        color: white;
        transition: all 0.3s ease;
        overflow: hidden;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
        min-height: 120px;
    }

    /* Hover Effect */
    .stat-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    }

    /* Text Content */
    .stat-text h4 {
        margin: 0;
        font-size: 1.4rem;
        font-weight: 700;
        letter-spacing: 0.5px;
    }

    .stat-text p {
        margin: 5px 0 0 0;
        opacity: 0.9;
        font-size: 0.9rem;
        font-weight: 400;
    }

    /* Icon Styling */
    .stat-icon {
        font-size: 3rem;
        opacity: 0.3;
        transition: all 0.3s ease;
    }

    .stat-card:hover .stat-icon {
        opacity: 0.6;
        transform: scale(1.1);
    }

    /* Color Themes */
    .stat-card.blue {
        background: linear-gradient(135deg, #3a7bd5, #00d2ff);
    }

    .stat-card.cyan {
        background: linear-gradient(135deg, #00b4db, #0083b0);
    }

    .stat-card.green {
        background: linear-gradient(135deg, #11998e, #38ef7d);
    }

    /* Responsive Adjustments */
    @media (max-width: 768px) {
        .stats-grid {
            grid-template-columns: 1fr;
        }
    }

    /* 1. Modal Container Styling */
    #materialsModal .modal-content {
        border-radius: 15px;
        overflow: hidden; /* Ensures header/footer keep the border radius */
        border: none;
    }

    #materialsModal .modal-header {
        padding: 1.25rem 1.5rem;
        border-bottom: 0;
    }

    #materialsModal .modal-title {
        font-weight: 700;
        letter-spacing: 0.5px;
        font-size: 1.25rem;
    }

    /* 2. Table Header Styling */
    #materialsModal .table thead th {
        background-color: #f8f9fa;
        color: #495057;
        text-transform: uppercase;
        font-size: 0.75rem;
        font-weight: 700;
        letter-spacing: 1px;
        padding: 15px 20px;
        border-top: none;
        border-bottom: 2px solid #dee2e6;
    }

    /* 3. Table Body Styling */
    #materialsModal .table tbody td {
        padding: 18px 20px;
        vertical-align: middle;
        color: #334155;
        font-size: 0.95rem;
        border-bottom: 1px solid #f1f5f9;
    }

    /* Hover effect for rows */
    #materialsModal .table-hover tbody tr:hover {
        background-color: #f1f7ff; /* Very light blue tint on hover */
        transition: background-color 0.2s ease;
    }

    /* 4. Badge & Text Styling inside Table */
    #materialsModal .badge {
        padding: 8px 12px;
        border-radius: 6px;
        font-weight: 600;
        font-size: 0.75rem;
    }

    #materialsModal .text-truncate {
        display: inline-block;
        max-width: 250px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* 5. Custom Scrollbar for the table-responsive div */
    #materialsModal .table-responsive {
        max-height: 70vh; /* Prevents modal from going off-screen */
        scrollbar-width: thin;
    }

    #materialsModal .table-responsive::-webkit-scrollbar {
        width: 6px;
    }

    #materialsModal .table-responsive::-webkit-scrollbar-thumb {
        background: #cbd5e1;
        border-radius: 10px;
    }

    /* 6. Action Button Styling */
    #materialsModal .btn-primary {
        background-color: #04AA6D; /* Matching your school green */
        border: none;
        padding: 6px 16px;
        border-radius: 8px;
        font-weight: 500;
        transition: all 0.3s ease;
    }

    #materialsModal .btn-primary:hover {
        background-color: #038a58;
        transform: translateY(-1px);
        box-shadow: 0 4px 8px rgba(4, 170, 109, 0.2);
    }

    /* Small detail for empty description or text */
    #materialsModal .text-muted.small {
        font-size: 0.85rem;
        color: #64748b !important;
    }

    .btn-group .btn {
        padding: 5px 12px;
        font-size: 0.8rem;
        font-weight: 600;
    }

    .btn-group .btn-outline-primary {
        border-color: #3b82f6;
        color: #3b82f6;
    }

    .btn-group .btn-outline-primary:hover {
        background-color: #3b82f6;
        color: white;
    }

    .btn-success {
        background-color: #04AA6D;
        border: none;
    }

    /* SweetAlert Input width adjustment */
    .swal2-input {
        width: 80% !important;
        font-size: 1rem !important;
    }
    .swal2-container {
        z-index: 99999 !important;
    }
/* End of Reading Materials CSS */

/* ACADEMIC RECORDS CSS */

    .sy-container .stats-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 1.5rem;
    }

    .stat-icon {
        font-size: 2.5rem;
        opacity: 0.2;
        position: absolute;
        right: 20px;
        bottom: 10px;
    }

    .stat-card {
        position: relative; /* Needed for the icon positioning */
        overflow: hidden;
    }
   /* 1. Professional Modal & Container Styling */
    #checklistModal .modal-content {
        border: none;
        box-shadow: 0 10px 30px rgba(0,0,0,0.2);
        max-height: 90vh;
        border-radius: 12px;
    }

    #checklistModalRole .modal-content {
        border: none;
        box-shadow: 0 10px 30px rgba(0,0,0,0.2);
        max-height: 90vh;
        border-radius: 12px;
    }

    #checklistModal .modal-header {
        background: #1e293b;
        padding: 1rem 1.5rem;
        border-top-left-radius: 12px;
        border-top-right-radius: 12px;
    }

    #checklistModalRole .modal-header {
        background: #1e293b;
        padding: 1rem 1.5rem;
        border-top-left-radius: 12px;
        border-top-right-radius: 12px;
    }

    #checklistModal .table-responsive {
        max-height: 70vh;
        overflow-y: auto;
        overflow-x: auto;
        background: #ffffff;
        position: relative;
    }

    #checklistModalRole .table-responsive {
        max-height: 70vh;
        overflow-y: auto;
        overflow-x: auto;
        background: #ffffff;
        position: relative;
    }

    #checklistModal .table {
        width: max-content; 
        min-width: 100%;
        border-collapse: separate; 
        border-spacing: 0;
        margin-bottom: 0;
    }

    #checklistModalRole .table {
        width: max-content; 
        min-width: 100%;
        border-collapse: separate; 
        border-spacing: 0;
        margin-bottom: 0;
    }

    /* Search Input Styling */
    #teacherSearch::placeholder { color: rgba(255,255,255,0.4); }
    #teacherSearch:focus { background: #0f172a !important; box-shadow: 0 0 0 0.25rem rgba(59, 130, 246, 0.25); border-color: #3b82f6; }

    /* 2. STICKY COLUMN 1 (Teachers) */
    #checklistModal tbody td:first-child {
        position: sticky;
        left: 0;
        z-index: 10;
        background-color: #ffffff; /* Base color for odd rows */
        border-right: 2px solid #cbd5e1;
        min-width: 250px;
        font-weight: 600;
        padding: 4px 15px;
    }
    #checklistModalRole tbody td:first-child {
        position: sticky;
        left: 0;
        z-index: 10;
        background-color: #ffffff; /* Base color for odd rows */
        border-right: 2px solid #cbd5e1;
        min-width: 250px;
        font-weight: 600;
        padding: 4px 15px;
    }

    /* 3. STICKY ROW 1 (Document Headers) */
    #checklistModal thead th {
        position: sticky;
        top: 0;
        z-index: 20;
        background: #f1f5f9; /* Slightly darker header background */
        color: #1e293b;
        font-weight: 700;
        text-transform: uppercase;
        font-size: 0.75rem;
        padding: 12px 10px;
        border-bottom: 2px solid #cbd5e1;
        border-right: 1px solid #cbd5e1;
        min-width: 130px;
        max-width: 150px;
        white-space: normal !important;
        vertical-align: middle;
        text-align: center;
    }
    #checklistModalRole thead th {
        position: sticky;
        top: 0;
        z-index: 20;
        background: #f1f5f9; /* Slightly darker header background */
        color: #1e293b;
        font-weight: 700;
        text-transform: uppercase;
        font-size: 0.75rem;
        padding: 12px 10px;
        border-bottom: 2px solid #cbd5e1;
        border-right: 1px solid #cbd5e1;
        min-width: 130px;
        max-width: 150px;
        white-space: normal !important;
        vertical-align: middle;
        text-align: center;
    }

    /* 4. THE CORNER CELL */
    #checklistModal thead th:first-child {
        left: 0;
        top: 0;
        z-index: 30;
        background: #e2e8f0;
        border-right: 2px solid #94a3b8;
    }
    #checklistModalRole thead th:first-child {
        left: 0;
        top: 0;
        z-index: 30;
        background: #e2e8f0;
        border-right: 2px solid #94a3b8;
    }

    /* 5. DARKER ZEBRA STRIPING */
    /* Target every even row */
    #checklistModal tbody tr:nth-child(even) td {
        background-color: #f1f5f9 !important; /* Darker Slate shade */
    }
    
    #checklistModalRole tbody tr:nth-child(even) td {
        background-color: #f1f5f9 !important; /* Darker Slate shade */
    }

    /* Crucial: Apply the same shade to the sticky cell in even rows */
    #checklistModal tbody tr:nth-child(even) td:first-child {
        background-color: #f1f5f9 !important;
    }

    /* Crucial: Apply the same shade to the sticky cell in even rows */
    #checklistModalRole tbody tr:nth-child(even) td:first-child {
        background-color: #f1f5f9 !important;
    }

    /* 6. Header Text Clamp (3-line limit) */
    .doc-name-container {
        display: -webkit-box;
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
        line-height: 1.25;
        max-height: 3.75em;
        text-align: center;
        width: 100%;
    }

    /* 7. General Cell Styling */
    #checklistModal tbody td {
        padding: 12px 20px;
        white-space: nowrap;
        border-bottom: 1px solid #cbd5e1;
        border-right: 1px solid #cbd5e1;
        vertical-align: middle;
    }
    #checklistModalRole tbody td {
        padding: 12px 20px;
        white-space: nowrap;
        border-bottom: 1px solid #cbd5e1;
        border-right: 1px solid #cbd5e1;
        vertical-align: middle;
    }

    #checklistModal .table th:last-child,
    #checklistModal .table td:last-child {
        border-right: none;
    }

    #checklistModalRole .table th:last-child,
    #checklistModalRole .table td:last-child {
        border-right: none;
    }

    /* 8. Professional Hover Effect */
    #checklistModal tbody tr:hover td,
    #checklistModal tbody tr:hover td:first-child {
        background-color: #e2e8f0 !important;
    }

    #checklistModalRole tbody tr:hover td,
    #checklistModalRole tbody tr:hover td:first-child {
        background-color: #e2e8f0 !important;
    }

    /* 9. Status Badge Styles */
    .status-badge {
        display: inline-flex;
        align-items: center;
        padding: 5px 12px;
        border-radius: 6px;
        font-weight: 700;
        font-size: 11px;
        letter-spacing: 0.5px;
    }
    .status-submitted { background: #dcfce7; color: #15803d; border: 1px solid #86efac; }
    .status-missing { background: #fee2e2; color: #b91c1c; border: 1px solid #fca5a5; }

    /* 10. Custom Scrollbar */
    /* Width is for vertical, Height is for horizontal */
    #checklistModal .table-responsive::-webkit-scrollbar { 
        height: 14px; 
        width: 14px; 
    }

    #checklistModalRole .table-responsive::-webkit-scrollbar { 
        height: 14px; 
        width: 14px; 
    }

    #checklistModal .table-responsive::-webkit-scrollbar-track { 
        background: #f1f5f9;
        border-radius: 10px;
    }

    #checklistModalRole .table-responsive::-webkit-scrollbar-track { 
        background: #f1f5f9;
        border-radius: 10px;
    }

    #checklistModal .table-responsive::-webkit-scrollbar-thumb { 
        background: #94a3b8; /* Slate 400 */
        border-radius: 10px;
        border: 3px solid #f1f5f9; /* Creates padding effect around thumb */
    }

    #checklistModalRole .table-responsive::-webkit-scrollbar-thumb { 
        background: #94a3b8; /* Slate 400 */
        border-radius: 10px;
        border: 3px solid #f1f5f9; /* Creates padding effect around thumb */
    }

    #checklistModal .table-responsive::-webkit-scrollbar-thumb:hover { 
        background: #64748b; /* Darker when hovering */
    }

    #checklistModalRole .table-responsive::-webkit-scrollbar-thumb:hover { 
        background: #64748b; /* Darker when hovering */
    }

    
/* END OF ACADEMIC RECORDS CSS */