﻿:root {
    --primary-color: rgb(53, 56, 102);
    /* Matched with Logo Background */
    --secondary-color: #ffcc00;
    /* AU Gold */
    --sidebar-width: 280px;
    --sidebar-mini-width: 80px;
    --sidebar-bg: #ffffff;
    --header-height: 70px;
    --bg-light: #dce3eb;
    /* Darker grey-blue for better card contrast */
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-light);
    overflow-x: hidden;
}

/* Preloader */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease;
}

.loader {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(0, 51, 102, 0.1);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Layout */
#main-wrapper {
    min-height: 100vh;
    position: relative;
}

/* Sidebar */
.nk-sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.05);
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 1040;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    overflow-y: auto;
    overflow-x: visible;
    /* Changed to visible to allow flyouts to escape */
}

/* Mini Sidebar Logic */
.mini-sidebar .nk-sidebar {
    width: var(--sidebar-mini-width);
    overflow: visible !important;
    /* Force visible to allow flyouts */
}

.mini-sidebar .nk-nav-scroll {
    overflow: visible !important;
    /* Force visible to allow flyouts */
}

.mini-sidebar .brand-title,
.mini-sidebar .nav-label,
.mini-sidebar .metismenu span,
.mini-sidebar .has-arrow::after {
    display: none !important;
}

.mini-sidebar .metismenu li a {
    justify-content: center;
    padding: 15px 0;
}

.mini-sidebar .menu-icon {
    margin-right: 0;
    font-size: 1.4rem;
}

/* Hover labels for mini-sidebar */
.mini-sidebar .metismenu li {
    position: relative;
}

    /* Flyout Submenu (using Bootstrap collapse) */
    .mini-sidebar .metismenu li .collapse.show,
    .mini-sidebar .metismenu li .collapsing {
        display: block !important;
        position: absolute;
        left: 80px;
        top: 0;
        width: 240px;
        background: #ffffff;
        box-shadow: 15px 5px 30px rgba(0, 0, 0, 0.2);
        padding: 10px 0;
        z-index: 9999;
        border-radius: 0 8px 8px 0;
        border: 1px solid #eef2f6;
        height: auto !important;
        transition: none !important;
        /* Disable bootstrap height transition to prevent bouncing */
        animation: fadeInFlyout 0.2s ease-out;
    }

@keyframes fadeInFlyout {
    from {
        opacity: 0;
        transform: translateX(-5px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.mini-sidebar .metismenu li .collapse.show li a {
    padding: 10px 25px;
    justify-content: flex-start;
    text-align: left;
}

    .mini-sidebar .metismenu li .collapse.show li a span {
        display: inline !important;
        /* Force nested text visible in flyout */
    }

/* Submenu flyout styling continues below */

/* Default hide submenus in mini mode, except when expanding as flyouts */
.mini-sidebar .metismenu ul:not(.show):not(.collapsing) {
    display: none !important;
}

.nk-sidebar.collapsed {
    left: calc(-1 * var(--sidebar-width));
}

.nav-header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    padding: 0 1.2rem;
    background: rgb(53, 56, 102);
    /* Specific brand color requested */
    color: white;
    position: sticky;
    top: 0;
    z-index: 1050;
    overflow: hidden;
}

.brand-logo {
    display: flex;
    align-items: center;
    width: 100%;
}

.brand-img {
    max-height: 40px;
    width: auto;
    flex-shrink: 0;
}

.mini-sidebar .brand-logo {
    justify-content: center;
}

.mini-sidebar .brand-img {
    max-height: 45px;
}

.brand-title {
    font-weight: 700;
    font-size: 1.2rem;
    margin-left: 10px;
    color: white;
    text-decoration: none;
    white-space: nowrap;
}

.nk-nav-scroll {
    padding: 1.5rem 0;
}

.metismenu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-label {
    padding: 10px 25px;
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 700;
    color: #adb5bd;
    letter-spacing: 1px;
}

.metismenu li a {
    display: flex;
    align-items: center;
    padding: 12px 25px;
    color: #495057;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

    .metismenu li a:hover {
        color: var(--primary-color);
        background: transparent;
        /* Removed blue-ish background */
    }

.metismenu li.active > a {
    color: var(--primary-color);
    background: rgba(0, 51, 102, 0.05);
    border-left-color: var(--primary-color);
    font-weight: 600;
}

.menu-icon {
    width: 24px;
    margin-right: 0.5rem;
    text-align: center;
    font-size: 1.1rem;
    color: #a0a8b1;
    transition: all 0.2s;
}

.metismenu li a:hover .menu-icon,
.metismenu li.active .menu-icon {
    color: var(--primary-color);
}

/* Breadcrumbs */
.breadcrumb-container {
    background: transparent;
    padding: 0 0 1.5rem 0;
}

.breadcrumb {
    margin-bottom: 0;
    padding: 0;
}

.breadcrumb-item {
    font-size: 0.85rem;
    font-weight: 500;
    color: #6c757d;
}

    .breadcrumb-item + .breadcrumb-item::before {
        content: "\f105";
        font-family: "Font Awesome 6 Free";
        font-weight: 900;
        padding: 0 10px;
        color: #adb5bd;
    }

    .breadcrumb-item a {
        color: var(--primary-color);
        text-decoration: none;
        transition: color 0.2s;
    }

        .breadcrumb-item a:hover {
            color: var(--secondary-color);
        }

    .breadcrumb-item.active {
        color: #495057;
        font-weight: 600;
    }

.has-arrow::after {
    content: "\f105";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    margin-left: auto;
    transition: transform 0.2s;
}

.has-arrow[aria-expanded="true"]::after {
    transform: rotate(90deg);
}

.metismenu ul {
    list-style: none;
    padding: 0 0 0 45px;
    background: #fbfbfb;
}

    .metismenu ul li a {
        padding: 8px 15px;
        font-size: 0.85rem;
    }

/* Header */
.header {
    height: var(--header-height);
    background: #fff;
    position: fixed;
    top: 0;
    right: 0;
    left: var(--sidebar-width);
    z-index: 1030;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
    /* Slightly stronger shadow */
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.mini-sidebar .header {
    left: var(--sidebar-mini-width);
}

.header.expanded {
    left: 0;
}

.nav-control {
    cursor: pointer;
    font-size: 1.25rem;
    color: #495057;
    padding: 10px;
    border-radius: 50%;
    transition: background 0.2s;
}

    .nav-control:hover {
        background: #f1f3f5;
    }

/* Content */
.content-body {
    margin-left: var(--sidebar-width);
    padding-top: var(--header-height);
    min-height: 100vh;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.mini-sidebar .content-body {
    margin-left: var(--sidebar-mini-width);
}

.content-body.expanded {
    margin-left: 0;
}

.container-fluid {
    padding: 2.5rem;
}

/* Card Depth Enhancement */
.card {
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08) !important;
}

/* Footer */
.footer {
    margin-left: var(--sidebar-width);
    background: #fff;
    padding: 1.5rem 2rem;
    border-top: 1px solid #eee;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.mini-sidebar .footer {
    margin-left: var(--sidebar-mini-width);
}

.footer.expanded {
    margin-left: 0;
}

.copyright p {
    margin: 0;
    color: #6c757d;
    font-size: 0.85rem;
}

/* Profile Dropdown */
.user-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    background: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .user-img img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

/* Faculty Table & Modal Styles */
.faculty-table thead th {
    background-color: #f8f9fa;
    color: #495057;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    border-top: none;
}

.faculty-table tbody td {
    vertical-align: middle;
    font-size: 0.9rem;
    color: #495057;
}

.badge-instructor {
    background-color: rgba(0, 51, 102, 0.1);
    color: var(--primary-color);
    font-weight: 600;
}

.badge-officer {
    background-color: rgba(108, 117, 125, 0.1);
    color: #6c757d;
    font-weight: 600;
}

/* Custom Tabs in Modal */
.custom-tab-container .nav-tabs {
    border-bottom: 2px solid #f1f3f5;
    margin-bottom: 1.5rem;
}

.custom-tab-container .nav-link {
    border: none;
    color: #6c757d;
    font-weight: 500;
    padding: 10px 15px;
    font-size: 0.85rem;
    position: relative;
    transition: all 0.2s;
}

    .custom-tab-container .nav-link.active {
        background: transparent;
        color: var(--primary-color);
    }

        .custom-tab-container .nav-link.active::after {
            content: "";
            position: absolute;
            bottom: -2px;
            left: 0;
            width: 100%;
            height: 2px;
            background-color: var(--primary-color);
        }

    .custom-tab-container .nav-link:hover {
        color: var(--primary-color);
    }

.modal-content {
    border: none;
    border-radius: 12px;
}

.modal-header {
    border-bottom: 1px solid #f1f3f5;
    padding: 1.5rem;
}

.modal-footer {
    border-top: 1px solid #f1f3f5;
}

.info-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #adb5bd;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.info-value {
    font-weight: 500;
    color: #495057;
    margin-bottom: 1rem;
}

.bg-soft-success {
    background-color: rgba(40, 167, 69, 0.1);
}

.bg-soft-warning {
    background-color: rgba(255, 193, 7, 0.1);
}

.bg-soft-danger {
    background-color: rgba(220, 53, 69, 0.1);
}

.modal-body-fixed-75 {
    height: 70vh;
    /* Approximate 70-75% of viewport for the body */
    overflow-y: auto;
    padding-bottom: 2rem;
}

    /* Custom scrollbar for fixed height containers */
    .modal-body-fixed-75::-webkit-scrollbar {
        width: 6px;
    }

    .modal-body-fixed-75::-webkit-scrollbar-track {
        background: transparent;
    }

    .modal-body-fixed-75::-webkit-scrollbar-thumb {
        background: #e9ecef;
        border-radius: 10px;
    }

        .modal-body-fixed-75::-webkit-scrollbar-thumb:hover {
            background: #dee2e6;
        }

@media (max-width: 991px) {
    .nk-sidebar {
        left: calc(-1 * var(--sidebar-width));
    }

        .nk-sidebar.active {
            left: 0;
        }

    .header {
        left: 0;
    }

    .content-body {
        margin-left: 0;
    }

    .footer {
        margin-left: 0;
    }
}
