:root {
    --primary-color: #003366;
    /* Navy Blue */
    --primary-light: #004d99;
    --secondary-color: #C5A059;
    /* Gold */
    --bg-light: #F4F7FA;
    --text-color: #2F3542;
    --text-muted: #747D8C;
    --white: #FFFFFF;
    --border-color: #E2E6EA;
    --sidebar-width: 260px;
    --header-height: 70px;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 5px 15px rgba(0, 0, 0, 0.1);
    --font-main: 'Prompt', sans-serif;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-light);
    color: var(--text-color);
    margin: 0;
    line-height: 1.6;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

/* Layout System */
.app-wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styling */
.sidebar {
    width: var(--sidebar-width);
    background: var(--white);
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    display: flex;
    flex-direction: column;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.05);
    z-index: 1000;
}

.sidebar-brand {
    height: var(--header-height);
    display: flex;
    align-items: center;
    padding: 0 25px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-brand a {
    text-decoration: none;
    color: var(--primary-color);
    font-size: 1.4rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-menu {
    flex: 1;
    padding: 20px 0;
    overflow-y: auto;
}

.menu-label {
    padding: 10px 25px;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 1px;
    font-weight: 600;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 12px 25px;
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    font-weight: 500;
    border-left: 4px solid transparent;
}

.nav-link i {
    width: 24px;
    margin-right: 15px;
    font-size: 1.1rem;
    color: var(--text-muted);
    transition: color 0.3s;
}

.nav-link:hover,
.nav-link.active {
    background: #F0F4F8;
    color: var(--primary-color);
    border-left-color: var(--secondary-color);
}

.nav-link:hover i,
.nav-link.active i {
    color: var(--primary-color);
}

/* Main Content Area */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Top Header */
.top-header {
    height: var(--header-height);
    background: var(--white);
    display: flex;
    justify-content: flex-end;
    /* Align user to right */
    align-items: center;
    padding: 0 30px;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 900;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 8px;
    transition: background 0.2s;
}

.user-profile:hover {
    background: #f8f9fa;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.user-info {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.user-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.user-role {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Page Content */
.content-wrapper {
    padding: 30px;
    flex: 1;
}

/* Components */
.card {
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    padding: 25px;
    border: 1px solid var(--border-color);
    transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.btn {
    padding: 10px 25px;
    border-radius: 8px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-light);
    box-shadow: 0 4px 10px rgba(0, 51, 102, 0.3);
}

/* Utilities */
.text-primary {
    color: var(--primary-color);
}

.mb-4 {
    margin-bottom: 1.5rem;
}

/* Dropdown */
.dropdown-menu {
    display: none;
    position: absolute;
    top: 75px;
    right: 30px;
    background: white;
    width: 220px;
    border-radius: 10px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    overflow: hidden;
    animation: slideDown 0.2s ease;
}

.dropdown-menu.show {
    display: block;
}

.dropdown-item {
    padding: 12px 20px;
    display: flex;
    align-items: center;
    color: var(--text-color);
    text-decoration: none;
    transition: background 0.1s;
    gap: 10px;
}

.dropdown-item:hover {
    background: #f8f9fa;
}

.dropdown-item.text-danger {
    color: #DC3545;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 900px) {
    .sidebar {
        width: 80px;
    }

    .sidebar-brand span,
    .nav-link span,
    .menu-label {
        display: none;
    }

    .main-content {
        margin-left: 80px;
    }

    .nav-link {
        justify-content: center;
        padding: 15px;
    }

    .nav-link i {
        margin: 0;
        font-size: 1.5rem;
    }
}

/* Course Card Image Fix */
.course-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 12px 12px 0 0;
}

/* specific button for course page */
.btn-gold {
    background: var(--secondary-color);
    color: white;
    box-shadow: 0 4px 15px rgba(197, 160, 89, 0.4);
    border: 1px solid #b38f4d;
}

.btn-gold:hover {
    background: #b38f4d;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(197, 160, 89, 0.6);
    color: white;
}

/* Course Detail Page */
.course-hero-card {
    border: none;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
    border-radius: 16px;
    overflow: hidden;
    background: white;
}

.course-hero-image-wrapper {
    flex: 0 0 400px;
    max-width: 100%;
    position: relative;
    min-height: 350px;
}

.course-hero-content {
    flex: 1;
    padding: 40px;
}

.syllabus-chapter {
    margin-bottom: 20px;
    border: 1px solid #edf2f7;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
    background: white;
}

.syllabus-header {
    background: #f8fbff;
    padding: 15px 25px;
    font-weight: 600;
    color: var(--primary-color);
    border-bottom: 1px solid #edf2f7;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.syllabus-item {
    padding: 15px 25px;
    border-bottom: 1px solid #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background 0.2s;
    cursor: default;
}

.syllabus-item:last-child {
    border-bottom: none;
}

.syllabus-item:hover {
    background: #fafbfc;
}

@media (max-width: 850px) {
    .course-hero-image-wrapper {
        flex: 0 0 100%;
        height: 250px;
        min-height: auto;
    }
}