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

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

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Hide elements utility */
.hidden {
    display: none !important;
}

/* Mobile bottom nav safe area */
.pb-safe {
    padding-bottom: env(safe-area-inset-bottom);
}

/* Body and layout adjustments */
body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* Adjust body padding based on device */
@media (max-width: 767px) {
    body {
        padding-bottom: 60px; /* Space for fixed footer on mobile */
    }
}

/* App container adjustments */
#app {
    min-height: calc(100vh - 60px); /* Account for footer height */
}

/* Main content adjustments */
main {
    min-height: calc(100vh - 60px); /* Adjust for footer */
    padding-top: 1rem;
    padding-bottom: 1rem;
}

/* Sidebar adjustments */
aside {
    z-index: 40; /* Lower than footer to prevent overlap */
    height: 100vh;
}

/* Footer styling */
footer {
    z-index: 50; /* Higher than sidebar */
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
}

/* Responsive adjustments for desktop */
@media (min-width: 768px) {
    main {
        margin-left: 16rem; /* Account for sidebar width */
        padding-top: 2rem;
        padding-bottom: 2rem;
    }
    
    footer {
        position: fixed;
        bottom: 0;
        left: 16rem; /* Account for sidebar */
        right: 0;
    }
}

/* Container styling */
.container {
    width: 100%;
    padding-right: 0.5rem;
    padding-left: 0.5rem;
    margin-right: auto;
    margin-left: auto;
}

/* Modal styling for grading */
.modal-overlay {
    z-index: 60;
}

/* Card styling for content */
.card {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Table styling */
table {
    width: 100%;
    display: table;
    border-collapse: separate;
    border-spacing: 0;
}

td, th {
    padding: 0.75rem;
    vertical-align: top;
}

/* Button styling */
button {
    cursor: pointer;
    transition: all 0.2s ease;
}

button:focus {
    outline: 2px solid #1a6ac3;
    outline-offset: 2px;
}

/* Form element styling */
input, select, textarea {
    transition: border-color 0.2s ease;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #1a6ac3;
    box-shadow: 0 0 0 3px rgba(26, 106, 195, 0.1);
}

/* Logo styling */
.logo-img {
    max-height: 3rem;
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .text-sm {
        font-size: 0.8rem;
    }
    
    .p-6 {
        padding: 1rem;
    }
    
    .grid-cols-1, .grid-cols-2, .grid-cols-3 {
        grid-template-columns: 1fr;
    }
    
    .fixed.bottom-0.left-0.right-0 {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
    }
}

