/* Custom Styles for School Report Card System */

:root {
    --primary-color: #4A9B8E;
    --secondary-color: #2B5F75;
    --success-color: #5FAD97;
    --danger-color: #dc3545;
    --warning-color: #F5A623;
    --info-color: #4A9B8E;
    --gold-color: #F5A623;
    --teal-color: #4A9B8E;
    --navy-color: #2B5F75;
    --light-teal: #5FAD97;
}

/* Logo styling - remove white background */
.navbar-brand img {
    mix-blend-mode: multiply;
    background: transparent;
}

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: white url('/static/images/pattern.png') repeat;
    background-size: 400px 400px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.92);
    pointer-events: none;
    z-index: 0;
}

main {
    position: relative;
    z-index: 1;
}

.navbar,
.footer {
    position: relative;
    z-index: 1050;
}

.navbar .dropdown-menu {
    z-index: 1051;
}

main {
    flex: 1;
    padding: 2rem 0;
}

.footer {
    margin-top: auto;
    background: linear-gradient(90deg, var(--navy-color) 0%, var(--teal-color) 100%);
    padding: 1.5rem 0;
}

/* Card Enhancements */
.card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s, box-shadow 0.3s;
    overflow: visible;
    background: white;
    position: relative;
    z-index: 1;
}

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

.card-header {
    border-radius: 15px 15px 0 0 !important;
    font-weight: 700;
    background: linear-gradient(135deg, var(--navy-color) 0%, var(--teal-color) 100%);
    color: white;
    padding: 1rem 1.5rem;
    border: none;
}

.card-body {
    padding: 2rem;
}

/* Gradient Cards for Dashboard */
.text-white.bg-primary {
    background: linear-gradient(135deg, var(--teal-color) 0%, var(--primary-color) 100%) !important;
}

.text-white.bg-info {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--light-teal) 100%) !important;
}

.text-white.bg-success {
    background: linear-gradient(135deg, var(--success-color) 0%, var(--teal-color) 100%) !important;
}

.text-white.bg-warning {
    background: linear-gradient(135deg, var(--gold-color) 0%, #FFB84D 100%) !important;
}

.text-white.bg-secondary {
    background: linear-gradient(135deg, var(--navy-color) 0%, var(--secondary-color) 100%) !important;
}

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

.table thead th {
    background: linear-gradient(135deg, var(--navy-color) 0%, var(--teal-color) 100%);
    color: white;
    border: none;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
    padding: 1rem;
}

.table tbody tr {
    transition: all 0.2s;
}

.table-hover tbody tr:hover {
    background: linear-gradient(90deg, rgba(74, 155, 142, 0.05) 0%, rgba(74, 155, 142, 0.1) 100%);
    transform: scale(1.01);
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(74, 155, 142, 0.03);
}

/* Button Enhancements */
.btn {
    border-radius: 8px;
    font-weight: 600;
    padding: 0.6rem 1.8rem;
    transition: all 0.3s ease;
    border: none;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.btn-primary {
    background: linear-gradient(135deg, var(--teal-color) 0%, var(--primary-color) 100%);
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color) 0%, var(--teal-color) 100%);
}

.btn-warning {
    background: linear-gradient(135deg, var(--gold-color) 0%, #FFB84D 100%);
}

.btn-info {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--light-teal) 100%);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--navy-color) 0%, var(--secondary-color) 100%);
}

.btn-sm {
    padding: 0.4rem 1rem;
    font-size: 0.875rem;
}

/* Form Enhancements */
.form-control,
.form-select {
    border-radius: 8px;
    border: 2px solid #e1e8ed;
    padding: 0.75rem 1rem;
    transition: all 0.3s;
    background: #f8f9fa;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(74, 155, 142, 0.15);
    background: white;
    transform: translateY(-2px);
}

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

/* Badge Enhancements */
.badge {
    padding: 0.5em 1em;
    font-weight: 600;
    border-radius: 20px;
    font-size: 0.85rem;
}

.badge.bg-success {
    background: linear-gradient(135deg, var(--success-color) 0%, var(--teal-color) 100%) !important;
}

.badge.bg-primary {
    background: linear-gradient(135deg, var(--teal-color) 0%, var(--primary-color) 100%) !important;
}

.badge.bg-warning {
    background: linear-gradient(135deg, var(--gold-color) 0%, #FFB84D 100%) !important;
}

.badge.bg-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%) !important;
}

/* Alert Enhancements */
.alert {
    border: none;
    border-radius: 12px;
    border-left: 5px solid;
    padding: 1rem 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.alert-success {
    border-left-color: var(--success-color);
    background: linear-gradient(135deg, #d1e7dd 0%, #f0f9f4 100%);
}

.alert-danger {
    border-left-color: var(--danger-color);
    background: linear-gradient(135deg, #f8d7da 0%, #fceded 100%);
}

.alert-warning {
    border-left-color: var(--warning-color);
    background: linear-gradient(135deg, #fff3cd 0%, #fffaeb 100%);
}

.alert-info {
    border-left-color: var(--info-color);
    background: linear-gradient(135deg, #cff4fc 0%, #e7f9fd 100%);
}

/* Dashboard Cards */
.dashboard-card {
    border-radius: 15px;
    padding: 2rem;
    color: white;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--teal-color) 100%);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Navbar Enhancements */
.navbar {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    padding: 1rem 0;
    position: relative;
    z-index: 1050;
}

.navbar-brand {
    font-weight: 800;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.navbar-brand img {
    transition: transform 0.3s;
}

.navbar-brand:hover img {
    transform: rotate(5deg) scale(1.1);
}

.nav-link {
    font-weight: 500;
    transition: all 0.3s;
    position: relative;
    padding: 0.5rem 1rem !important;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: white;
    transition: all 0.3s;
    transform: translateX(-50%);
}

.nav-link:hover::after {
    width: 80%;
}

/* Page Headers */
h1,
h2,
h3,
h4,
h5 {
    color: var(--navy-color);
    font-weight: 700;
}

h1 {
    margin-bottom: 2rem;
    position: relative;
    display: inline-block;
}

h1::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--gold-color) 0%, var(--teal-color) 100%);
    border-radius: 2px;
}

/* Loading Spinner */
.spinner-border {
    width: 2rem;
    height: 2rem;
    border-width: 0.3em;
}

/* Pagination */
.pagination .page-link {
    border-radius: 8px;
    margin: 0 3px;
    border: 2px solid #e1e8ed;
    color: var(--navy-color);
    font-weight: 600;
    transition: all 0.3s;
}

.pagination .page-link:hover {
    background: var(--teal-color);
    color: white;
    border-color: var(--teal-color);
    transform: translateY(-2px);
}

.pagination .page-item.active .page-link {
    background: linear-gradient(135deg, var(--teal-color) 0%, var(--primary-color) 100%);
    border-color: transparent;
}

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

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--navy-color) 0%, var(--teal-color) 100%);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--teal-color) 0%, var(--navy-color) 100%);
}

/* Icon Animations */
.fa,
.fas,
.far {
    transition: transform 0.3s;
}

.btn:hover .fa,
.btn:hover .fas,
.btn:hover .far {
    transform: scale(1.2);
}

/* Responsive */
@media (max-width: 768px) {
    .card-body {
        padding: 1.5rem;
    }

    .table {
        font-size: 0.85rem;
    }

    h1 {
        font-size: 1.75rem;
    }

    main {
        padding: 1rem 0;
    }
}

/* Utility Classes */
.opacity-50 {
    opacity: 0.5;
}

.gap-2 {
    gap: 0.5rem;
}

.gap-3 {
    gap: 1rem;
}

/* Hover Effects for Cards */
.card.hover-lift {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.card.hover-lift:hover {
    transform: translateY(-10px) scale(1.02);
}

/* Print Styles */
@media print {

    .navbar,
    .btn,
    .no-print {
        display: none !important;
    }

    body {
        background: white;
    }

    .card {
        box-shadow: none;
        border: 1px solid #dee2e6;
    }
}

/* Animation Keyframes */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* Stat Cards Enhancement */
.stat-card {
    position: relative;
    overflow: visible;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    transform: rotate(45deg);
    z-index: 0;
}

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