/* Custom CSS for JEMCC School Management System */

/* Import Rockwell Bold font */
@font-face {
    font-family: 'Rockwell Bold';
    src: url('https://db.onlinewebfonts.com/t/63bd6e9cdd196d29c1ba1d3d8b851c8a.eot');
    src: url('https://db.onlinewebfonts.com/t/63bd6e9cdd196d29c1ba1d3d8b851c8a.eot?#iefix') format('embedded-opentype'),
         url('https://db.onlinewebfonts.com/t/63bd6e9cdd196d29c1ba1d3d8b851c8a.woff2') format('woff2'),
         url('https://db.onlinewebfonts.com/t/63bd6e9cdd196d29c1ba1d3d8b851c8a.woff') format('woff'),
         url('https://db.onlinewebfonts.com/t/63bd6e9cdd196d29c1ba1d3d8b851c8a.ttf') format('truetype'),
         url('https://db.onlinewebfonts.com/t/63bd6e9cdd196d29c1ba1d3d8b851c8a.svg#Rockwell Bold') format('svg');
}

/* Font class for Rockwell Bold */
.rockwell-bold {
    font-family: 'Rockwell Bold', 'Rockwell', serif;
    font-weight: 700;
}

/* Chart container styles */
.chart-container {
    position: relative;
    width: 100%;
    min-height: 250px;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.card .chart-container {
    padding: 10px;
}

/* Logo styling */
.logo-img {
    width: 45px;
    height: 45px; 
    border-radius: 50%;
    object-fit: cover;
    background-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 5px rgba(255, 255, 255, 0.4);
}

/* College Header Banner styling */
.college-header {
    padding: 1rem 0;
    position: relative;
}

.institution-name {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--bs-primary);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
    letter-spacing: 1px;
    margin-bottom: 0;
    font-family: 'Rockwell Bold', 'Rockwell', serif;
}

.institution-location {
    font-size: 1.3rem;
    color: var(--bs-secondary);
    font-weight: 500;
    margin-bottom: 0;
}

.header-divider {
    height: 3px;
    background: linear-gradient(to right, transparent, var(--bs-primary), transparent);
    margin: 0.5rem auto;
    width: 80%;
}

/* Mobile navbar adjustment for enhanced logo */
@media (max-width: 767.98px) {
    .navbar {
        padding-top: 1rem;
        padding-bottom: 1rem;
        min-height: 150px;
        flex-wrap: wrap;
        background: white !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }
    
    .navbar-brand {
        margin-right: 0;
        margin-bottom: 0.5rem;
        width: 100%;
        justify-content: center;
    }
    
    .navbar-nav {
        width: 100%;
        justify-content: flex-end;
    }
    
    /* Enhanced mobile brand name */
    .navbar-brand .d-block {
        font-size: 1.2rem;
        letter-spacing: 1px;
        color: var(--bs-primary);
        text-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
    }
}

/* Back to top button */
#back-to-top {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 99;
    font-size: 16px;
    border: none;
    outline: none;
    background-color: var(--bs-primary);
    color: white;
    cursor: pointer;
    padding: 10px 15px;
    border-radius: 50%;
    transition: 0.3s;
}

#back-to-top:hover {
    background-color: var(--bs-primary-dark);
}

/* Sidebar styles */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 100;
    padding: 0;
    width: 225px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
    overflow-y: auto;
    background-color: var(--bs-light);
    border-right: 1px solid rgba(0, 0, 0, 0.1);
}

/* Scrollable sidebar */
#accordionSidebar {
    max-height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: var(--bs-secondary) transparent;
}

/* Custom scrollbar for webkit browsers */
#accordionSidebar::-webkit-scrollbar {
    width: 5px;
}

#accordionSidebar::-webkit-scrollbar-track {
    background: transparent;
}

#accordionSidebar::-webkit-scrollbar-thumb {
    background-color: var(--bs-secondary);
    border-radius: 10px;
}

.sidebar-heading {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.13rem;
    padding: 1rem 1rem 0.5rem;
    color: var(--bs-secondary);
}

.sidebar .nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem;
    color: var(--bs-dark);
    transition: 0.2s;
    font-size: 0.9rem;
}

.sidebar .nav-link:hover {
    color: var(--bs-primary);
    background-color: rgba(0, 0, 0, 0.05);
}

/* Submenu items */
.collapse-inner .collapse-item {
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
    margin: 0 0.5rem;
    display: block;
    color: var(--bs-dark);
    text-decoration: none;
    border-radius: 0.35rem;
    white-space: nowrap;
}

.sidebar .nav-link.active {
    color: white;
    background-color: var(--bs-primary);
}

/* Sidebar brand styling for enhanced logo */
.sidebar-brand {
    height: auto !important;
    padding: 1.5rem 1rem 2.5rem !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: linear-gradient(180deg, rgba(0,0,0,0.05) 0%, rgba(0,0,0,0) 100%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.sidebar-brand-icon {
    margin-bottom: 1rem;
    transition: transform 0.3s ease;
}

.sidebar-brand:hover .sidebar-brand-icon {
    transform: scale(1.05);
}

.sidebar-brand-text {
    margin-top: 0.5rem;
    letter-spacing: 1px;
    color: var(--bs-primary);
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
    font-family: 'Rockwell Bold', 'Rockwell', serif;
    text-align: center;
    line-height: 1.4;
}

.sidebar-brand-text .line-1 {
    font-size: 1.7rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.sidebar-brand-text .line-2 {
    font-size: 1.7rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
}

.sidebar-brand-text .line-3 {
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

.mobile-brand-text {
    text-align: center;
    line-height: 1.4;
}

.mobile-brand-text .line-1 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.mobile-brand-text .line-2 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
}

.mobile-brand-text .line-3 {
    font-size: 1.4rem;
    letter-spacing: 0.5px;
}

/* Card styling */
.card {
    border-radius: 0.5rem;
    border: none;
    overflow: hidden;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    margin-bottom: 1.5rem;
}

/* Stats card styling */
.stats-card {
    position: relative;
    overflow: hidden;
    border-left: 4px solid transparent;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.stats-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.card-primary {
    border-left-color: var(--bs-primary);
}

.card-success {
    border-left-color: var(--bs-success);
}

.card-info {
    border-left-color: var(--bs-info);
}

.card-warning {
    border-left-color: var(--bs-warning);
}

.stats-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    opacity: 0.25;
    z-index: 0;
}

.card-primary::before {
    background-color: var(--bs-primary);
}

.card-success::before {
    background-color: var(--bs-success);
}

.card-info::before {
    background-color: var(--bs-info);
}

.card-warning::before {
    background-color: var(--bs-warning);
}

.stats-card .card-body {
    position: relative;
    z-index: 1;
}

.stats-card .card-title {
    font-weight: 600;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.5);
}

.stats-card .card-value {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-top: 0.25rem;
    color: var(--bs-dark);
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.5);
}

.card-primary .card-value {
    color: var(--bs-primary);
}

.card-success .card-value {
    color: var(--bs-success);
}

.card-info .card-value {
    color: var(--bs-info);
}

.card-warning .card-value {
    color: var(--bs-warning);
}

.stats-card .card-icon {
    font-size: 2rem;
    opacity: 0.7;
}

/* Dashboard chart cards styling */
.card.shadow.h-100 {
    height: 350px !important;
    display: flex;
    flex-direction: column;
}

.card-header {
    background-color: rgba(0, 0, 0, 0.03);
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
    padding: 0.75rem 1.25rem;
    flex-shrink: 0;
}

.card-body {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
}

/* Wrapper and content styles */
#wrapper {
    display: flex;
    flex-direction: row;
    overflow-x: hidden;
    width: 100%;
    position: relative;
}

.content-wrapper {
    width: 100%;
    min-height: 100vh;
    margin-left: 225px; /* Match sidebar width */
    max-width: calc(100% - 225px);
    transition: margin-left 0.3s, max-width 0.3s;
}

/* Medium screens and below - reduce padding and adjust elements */
@media (max-width: 991.98px) {
    .container-fluid {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    /* Card adjustments for small screens */
    .card {
        margin-bottom: 1rem;
    }

    /* Fixes for stat cards display */
    .stats-card .card-value {
        font-size: 2rem;
    }
    
    .stats-card .card-icon {
        font-size: 1.5rem;
    }
}

/* Small screens - collapsed sidebar */
@media (max-width: 767.98px) {
    .sidebar {
        width: 0;
        overflow: hidden;
        position: fixed;
        z-index: 1030; /* Higher than the content */
    }
    
    .content-wrapper {
        margin-left: 0 !important;
        max-width: 100% !important;
    }
    
    body.sidebar-toggled .sidebar {
        width: 225px;
    }
    
    body.sidebar-toggled .content-wrapper {
        /* Add overlay effect when sidebar is toggled on mobile */
        position: relative;
    }
    
    /* Ensure content doesn't overlap with toggled sidebar on mobile */
    body.sidebar-toggled .content-wrapper::before {
        content: "";
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.3);
        z-index: 1020;
        display: block;
    }
}

/* Data table customizations */
table.dataTable thead th, table.dataTable thead td {
    padding: 10px 18px;
    border-bottom: 1px solid #dee2e6;
}

table.dataTable tbody th, table.dataTable tbody td {
    padding: 8px 10px;
}

.dataTables_wrapper .dataTables_length, 
.dataTables_wrapper .dataTables_filter, 
.dataTables_wrapper .dataTables_info, 
.dataTables_wrapper .dataTables_processing, 
.dataTables_wrapper .dataTables_paginate {
    color: var(--bs-body-color);
    margin-bottom: 10px;
}

/* Custom form styling */
.form-control, .form-select {
    border-radius: 0.25rem;
    padding: 0.375rem 0.75rem;
    background-color: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    color: var(--bs-body-color);
}

.form-control:focus, .form-select:focus {
    color: var(--bs-body-color);
    background-color: var(--bs-body-bg);
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.2rem rgba(var(--bs-primary-rgb), 0.25);
}

/* Scholarship badge styling */
.scholarship-badge {
    padding: 0.35em 0.65em;
    font-size: 0.75em;
    font-weight: 700;
    border-radius: 0.35rem;
}

/* Login Page Styles */
.auth-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 40px 20px;
    background-color: var(--bs-white);
    background-image: linear-gradient(to bottom right, rgba(240, 248, 240, 0.5), rgba(255, 255, 255, 1));
}

/* Index page specific styles */
body:not(.logged-in) .auth-wrapper {
    background-color: var(--bs-white);
    background-image: linear-gradient(to bottom right, rgba(240, 248, 240, 0.5), rgba(255, 255, 255, 1));
}

.logo-wrapper {
    text-align: center;
    margin-bottom: 30px;
}

.logo-wrapper h1 {
    font-size: 2.2rem;
    color: var(--bs-primary);
    margin-top: 15px;
    letter-spacing: 1px;
}

.auth-card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 5px 30px rgba(0, 100, 0, 0.1);
    overflow: hidden;
}

/* Custom animation for the login page logo */
.logo-wrapper .logo-img {
    animation: subtle-pulse 3s infinite alternate;
}

@keyframes subtle-pulse {
    from {
        box-shadow: 0 0 15px rgba(0, 100, 0, 0.2);
        transform: scale(1);
    }
    to {
        box-shadow: 0 0 20px rgba(0, 100, 0, 0.3);
        transform: scale(1.03);
    }
}

/* Print styles */
@media print {
    .sidebar, .navbar, .btn, #back-to-top, .no-print {
        display: none !important;
    }
    
    .content-wrapper {
        margin-left: 0 !important;
        width: 100% !important;
    }
    
    .card {
        box-shadow: none !important;
        border: 1px solid #dee2e6 !important;
    }
    
    @page {
        margin: 1cm;
    }
}