:root {
    --main-bg-color: #009d63;
    --main-text-color: #009d63;
    --second-text-color: #bbbec5;
    --second-bg-color: #c1efde;
}

body {
    font-family: 'Sarabun', sans-serif;
    background-color: #f8f9fa;
    overflow-x: hidden;
}

/* Sidebar & Wrapper */
#wrapper {
    overflow-x: hidden;
    display: flex;
}

#sidebar-wrapper {
    min-height: 100vh;
    margin-left: -20rem;
    transition: margin 0.25s ease-out;
}

#sidebar-wrapper .sidebar-heading {
    padding: 0.875rem 1.25rem;
    font-size: 1.2rem;
}

#sidebar-wrapper .list-group {
    width: 20rem;
}

#page-content-wrapper {
    min-width: 100vw;
    transition: margin 0.25s ease-out;
}

/* Toggled State */
#wrapper.toggled #sidebar-wrapper {
    margin-left: 0;
}

/* Responsive */
@media (min-width: 768px) {
    #sidebar-wrapper {
        margin-left: 0;
    }

    #page-content-wrapper {
        min-width: 0;
        width: 100%;
    }

    #wrapper.toggled #sidebar-wrapper {
        margin-left: -20rem;
    }
}

/* Custom Colors */
.primary-text {
    color: var(--main-text-color);
}

.second-text {
    color: var(--second-text-color);
}

.primary-bg {
    background-color: var(--main-bg-color);
}

.secondary-bg {
    background-color: var(--second-bg-color);
}

.rounded-full {
    border-radius: 100%;
}

/* Dashboard Cards */
.p-3 {
    padding: 1rem !important;
}

.shadow-sm {
    box-shadow: 0 .125rem .25rem rgba(0, 0, 0, .075) !important;
}

/* --- New Styles for Index Page --- */

/* Animations */
.fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
    opacity: 0;
    transform: translateY(20px);
}

.delay-1 {
    animation-delay: 0.2s;
}

.delay-2 {
    animation-delay: 0.4s;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Role Cards */
.role-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    overflow: hidden;
}

.role-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1) !important;
}

/* Icon Circles */
.icon-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.role-card:hover .icon-circle {
    transform: scale(1.1);
}

/* Role Backgrounds */
.bg-student {
    background: linear-gradient(135deg, #2980b9, #6dd5fa);
}

.bg-staff {
    background: linear-gradient(135deg, #11998e, #38ef7d);
}

.bg-admin {
    background: linear-gradient(135deg, #c0392b, #e74c3c);
}

/* Modern Sidebar Styles */
.modern-sidebar {
    width: 20rem;
    min-height: 100vh;
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    /* Slate 800 -> 900 */
    color: #94a3b8;
    /* Slate 400 */
    box-shadow: 4px 0 10px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

.modern-sidebar .sidebar-heading {
    color: #f8fafc;
    /* Slate 50 */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    letter-spacing: 1px;
}

.modern-sidebar .list-group-item {
    border: none;
    color: #94a3b8;
    padding: 0.75rem 1.5rem;
    transition: all 0.25s ease;
    font-weight: 500;
    margin-bottom: 2px;
    position: relative;
}

/* Hover Effect */
.modern-sidebar .list-group-item:hover,
.modern-sidebar .list-group-item:focus {
    color: #f1f5f9;
    /* Slate 100 */
    background-color: rgba(255, 255, 255, 0.05);
    padding-left: 1.75rem;
    /* Slight nudge */
}

/* Active State */
.modern-sidebar .list-group-item.active {
    color: #ffffff;
    background-color: #0d6efd;
    /* Bootstrap Primary */
    background: linear-gradient(90deg, #0d6efd 0%, #0b5ed7 100%);
    box-shadow: 0 4px 6px rgba(13, 110, 253, 0.3);
    border-radius: 0 50px 50px 0;
    /* Rounded right edge */
    margin-right: 10px;
}

/* Submenu Styles */
#userSubmenu {
    background-color: rgba(0, 0, 0, 0.2);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.modern-sidebar .list-group-item.sub-active {
    color: #60a5fa !important;
    /* Blue 400 */
    background-color: rgba(13, 110, 253, 0.1);
}

/* Icons */
.modern-sidebar i {
    font-size: 1.1em;
    width: 25px;
    text-align: center;
    display: inline-block;
}

/* Logout Button Special Style */
.modern-sidebar .logout-btn:hover {
    background-color: rgba(220, 53, 69, 0.1);
    /* Red tint */
    color: #ff6b6b !important;
}

/* --- Modern Dashboard Cards --- */
.card-custom {
    border: none;
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    position: relative;
    z-index: 1;
}

.card-custom:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.card-custom .card-body {
    padding: 1.5rem;
    color: white;
}

.card-custom .icon-bg {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 4rem;
    opacity: 0.2;
    z-index: -1;
    transition: all 0.3s ease;
}

.card-custom:hover .icon-bg {
    transform: translateY(-50%) scale(1.1) rotate(10deg);
    opacity: 0.3;
}

.card-custom h3 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0;
}

.card-custom p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 0;
}

/* Gradients */
.bg-gradient-primary {
    background: linear-gradient(45deg, #4e73df 0%, #224abe 100%);
}

.bg-gradient-success {
    background: linear-gradient(45deg, #1cc88a 0%, #13855c 100%);
}

.bg-gradient-info {
    background: linear-gradient(45deg, #36b9cc 0%, #258391 100%);
}

.bg-gradient-warning {
    background: linear-gradient(45deg, #f6c23e 0%, #dda20a 100%);
}

.bg-gradient-danger {
    background: linear-gradient(45deg, #e74a3b 0%, #be2617 100%);
}

/* Table Enhancements */
.table-hover tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

.table thead th {
    background-color: #f8f9fc;
    border-bottom: 2px solid #e3e6f0;
    font-weight: 600;
    color: #4e73df;
    text-transform: uppercase;
    font-size: 0.85rem;
}