/* School ERP System - Custom Styles */

/* Google Fonts */
:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --font-poppins: 'Poppins', sans-serif;
    --font-montserrat: 'Montserrat', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-poppins), sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background-color: #f5f5f5;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-montserrat), sans-serif;
    font-weight: 600;
}

/* Navbar Styles */
.navbar {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-family: var(--font-montserrat), sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
}

.nav-link {
    font-weight: 500;
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: #fff !important;
    transform: translateY(-2px);
}

/* Hero Section */
.hero-section {
    position: relative;
    height: 600px;
    background: linear-gradient(135deg, rgba(13, 110, 253, 0.9), rgba(13, 110, 253, 0.7)), 
                url('https://images.unsplash.com/photo-1523050854058-8df90110c9f1?w=1920') center/cover;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
}

.hero-content {
    padding: 2rem;
    animation: fadeInUp 1s ease;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Card Styles */
.card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.card-header {
    background: linear-gradient(135deg, var(--primary-color), #0a58ca);
    color: white;
    font-weight: 600;
    border-bottom: none;
}

.card-body {
    padding: 1.5rem;
}

.card-img-top {
    height: 200px;
    object-fit: cover;
}

/* Button Styles */
.btn {
    border-radius: 8px;
    padding: 0.6rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
    font-family: var(--font-poppins), sans-serif;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), #0a58ca);
    border: none;
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color), #146c43);
    border: none;
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger-color), #b02a37);
    border: none;
}

/* Section Styles */
.section {
    padding: 5rem 0;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.section-title p {
    color: var(--secondary-color);
    font-size: 1.1rem;
}

/* Feature Cards */
.feature-card {
    text-align: center;
    padding: 2rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    height: 100%;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.feature-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.feature-card h4 {
    margin-bottom: 1rem;
    color: var(--dark-color);
}

.feature-card p {
    color: var(--secondary-color);
}

/* Quick Links */
.quick-link {
    display: block;
    padding: 1.5rem;
    background: white;
    border-radius: 10px;
    text-decoration: none;
    color: var(--dark-color);
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    text-align: center;
}

.quick-link:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-5px);
}

.quick-link i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    display: block;
}

/* Notice Board */
.notice-item {
    background: white;
    border-left: 4px solid var(--primary-color);
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.notice-item:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.notice-item.urgent {
    border-left-color: var(--danger-color);
}

.notice-item.event {
    border-left-color: var(--success-color);
}

.notice-date {
    font-size: 0.85rem;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

.notice-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

/* Gallery */
.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: all 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay i {
    color: white;
    font-size: 2rem;
}

/* Form Styles */
.form-control {
    border-radius: 8px;
    padding: 0.75rem 1rem;
    border: 2px solid #e0e0e0;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

/* Table Styles */
.table {
    border-radius: 10px;
    overflow: hidden;
}

.table thead {
    background: linear-gradient(135deg, var(--primary-color), #0a58ca);
    color: white;
}

.table thead th {
    border: none;
    padding: 1rem;
    font-weight: 600;
}

.table tbody tr {
    transition: all 0.3s ease;
}

.table tbody tr:hover {
    background-color: #f8f9fa;
}

/* Dashboard Styles */
.dashboard-card {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
}

.stat-card {
    background: linear-gradient(135deg, var(--primary-color), #0a58ca);
    color: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(13, 110, 253, 0.3);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(13, 110, 253, 0.4);
}

.stat-card.success {
    background: linear-gradient(135deg, var(--success-color), #146c43);
    box-shadow: 0 5px 20px rgba(25, 135, 84, 0.3);
}

.stat-card.warning {
    background: linear-gradient(135deg, var(--warning-color), #d39e00);
    box-shadow: 0 5px 20px rgba(255, 193, 7, 0.3);
}

.stat-card.danger {
    background: linear-gradient(135deg, var(--danger-color), #b02a37);
    box-shadow: 0 5px 20px rgba(220, 53, 69, 0.3);
}

.stat-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1rem;
    opacity: 0.9;
}

/* Sidebar Styles (Admin Panel) */
.sidebar {
    background: linear-gradient(180deg, #1a237e, #0d47a1);
    min-height: 100vh;
    padding: 2rem 0;
    color: white;
}

.sidebar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    padding: 0 1.5rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
}

.sidebar-brand i {
    margin-right: 0.5rem;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
}

.sidebar-menu li {
    margin-bottom: 0.5rem;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-left: 4px solid white;
}

.sidebar-menu a i {
    margin-right: 0.75rem;
    width: 20px;
}

/* Login Page Styles */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(13, 110, 253, 0.9), rgba(13, 110, 253, 0.7)), 
                url('https://images.unsplash.com/photo-1523050854058-8df90110c9f1?w=1920') center/cover;
}

.login-card {
    background: white;
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 450px;
    width: 100%;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.login-header h3 {
    font-weight: 700;
    color: var(--dark-color);
}

/* Footer Styles */
footer {
    margin-top: auto;
}

footer a {
    transition: all 0.3s ease;
}

footer a:hover {
    color: white !important;
}

.social-links a {
    font-size: 1.25rem;
    transition: all 0.3s ease;
}

.social-links a:hover {
    color: var(--primary-color) !important;
    transform: translateY(-3px);
}

/* Toast Notification */
.toast {
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.toast-header {
    border-radius: 10px 10px 0 0;
}

/* Modal Styles */
.modal-content {
    border-radius: 15px;
    border: none;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
    border-bottom: none;
    padding: 1.5rem;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    border-top: none;
    padding: 1.5rem;
}

/* Badge Styles */
.badge {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 500;
}

/* Progress Bar */
.progress {
    height: 10px;
    border-radius: 5px;
    background-color: #e9ecef;
}

.progress-bar {
    border-radius: 5px;
}

/* Responsive Styles */
@media (max-width: 991.98px) {
    body.in-portal > .d-flex {
        flex-direction: column !important;
    }
    body.in-portal > .d-flex > div.sidebar {
        width: 100% !important;
        min-height: auto !important;
        display: block !important;
        background: transparent !important;
        padding: 0 !important;
        margin-bottom: 1rem;
    }
}
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .section {
        padding: 3rem 0;
    }
    
    .section-title h2 {
        font-size: 2rem;
    }
    
    .stat-value {
        font-size: 2rem;
    }
    
    .sidebar {
        min-height: auto;
    }
}

/* Loading Spinner */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* Print Styles */
@media print {
    .navbar,
    .sidebar,
    .btn,
    footer {
        display: none !important;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* Sticky Bottom Tab Bar (mobile only) */
@media (max-width: 991.98px) {
    body {
        padding-bottom: 72px;
    }
}
.sticky-bottom-tabbar {
    display: none;
}
@media (max-width: 991.98px) {
    .sticky-bottom-tabbar {
        display: block;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 1030;
        padding-bottom: env(safe-area-inset-bottom, 0);
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        box-shadow: 0 -1px 12px rgba(0, 0, 0, 0.1);
        border-top: 1px solid rgba(0, 0, 0, 0.05);
    }
}
.sticky-bottom-tabbar .tab-row {
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 4px 0;
    max-width: 500px;
    margin: 0 auto;
}
.sticky-bottom-tabbar .tab-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #8e8e93;
    font-size: 0.6rem;
    font-weight: 500;
    padding: 4px 0 2px;
    min-width: 56px;
    min-height: 52px;
    transition: color 0.2s;
    letter-spacing: 0.2px;
    position: relative;
    -webkit-tap-highlight-color: transparent;
    border-radius: 8px;
}
.sticky-bottom-tabbar .tab-item i {
    font-size: 1.3rem;
    margin-bottom: 2px;
    transition: transform 0.2s;
}
.sticky-bottom-tabbar .tab-item:hover,
.sticky-bottom-tabbar .tab-item.active {
    color: #0d6efd;
}
.sticky-bottom-tabbar .tab-item.active i {
    color: #0d6efd;
}
.sticky-bottom-tabbar .tab-item.active span {
    font-weight: 600;
}
.sticky-bottom-tabbar .tab-item:active i {
    transform: scale(0.85);
}

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0a58ca;
}

/* Mobile App Header & Layout Overrides */
.app-header {
    display: none;
}

@media (max-width: 991.98px) {
    /* Hide desktop site navbar on all pages on mobile */
    nav.navbar {
        display: none !important;
    }
    
    /* Make body padding match the fixed top header on mobile */
    body {
        padding-top: 56px !important;
        background-color: #f7f9fc !important;
    }
    
    /* Style the fixed top mobile app bar on mobile */
    .app-header {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: 56px;
        background: linear-gradient(135deg, var(--primary-color), #0a58ca);
        color: white;
        padding: 0 1.25rem;
        z-index: 1040;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
        border-bottom: 1px solid rgba(255,255,255,0.08);
    }
    
    /* Enhance the card list and dashboards for modern mobile app look */
    body.in-portal .container-fluid {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
    
    /* Stat cards layout: fit in 2 columns */
    body.in-portal .row.g-4:has(.stat-card) > [class*="col-"] {
        width: 50% !important;
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
        margin-bottom: 0 !important;
    }
    body.in-portal .row.g-4:has(.stat-card) {
        margin-left: -0.5rem !important;
        margin-right: -0.5rem !important;
        row-gap: 1rem !important;
    }
    
    /* App stat card design */
    body.in-portal .stat-card {
        padding: 1rem !important;
        height: 100%;
        display: flex;
        flex-direction: column;
        justify-content: center;
        border-radius: 12px !important;
        box-shadow: 0 4px 12px rgba(0,0,0,0.05) !important;
    }
    body.in-portal .stat-icon {
        font-size: 1.75rem !important;
        margin-bottom: 0.5rem !important;
    }
    body.in-portal .stat-value {
        font-size: 1.4rem !important;
        font-weight: 700 !important;
    }
    body.in-portal .stat-label {
        font-size: 0.75rem !important;
    }
    
    /* App tables scroll cleaner */
    body.in-portal .table-responsive {
        border-radius: 10px;
        overflow: hidden;
        border: 1px solid rgba(0,0,0,0.05);
    }
    
    /* Remove redundant layout paddings on mobile */
    body.in-portal .py-4 {
        padding-top: 1rem !important;
        padding-bottom: 1rem !important;
    }
}

/* Home achievements stats row mobile font scaling */
@media (max-width: 768px) {
    .bg-primary .stat-value {
        font-size: 1.35rem !important;
        font-weight: 700 !important;
    }
    .bg-primary .stat-label {
        font-size: 0.7rem !important;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
}

/* Hide horizontal scrollbars for clean mobile app experience */
.scroll-wrapper::-webkit-scrollbar {
    display: none !important;
}
.scroll-wrapper {
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}



