:root {
    --primary-color: #b04b34;
    --primary-light: #e67e63;
    --primary-dark: #8a3c2a;
    --secondary-color: #2c3e50;
    --light-color: #f8f9fa;
    --dark-color: #1a1a1a;
    --sidebar-width: 280px;
    --transition-speed: 0.3s;
    
    /* Light Mode */
    --body-bg: #f5f7fa;
    --main-bg: #f8fafc;
    --header-bg: #ffffff;
    --card-bg: #ffffff;
    --text-primary: #2c3e50;
    --text-secondary: #666666;
    --border-color: #eef2f7;
    --shadow-color: rgba(0, 0, 0, 0.07);
    --hover-bg: rgba(176, 75, 52, 0.08);
    --input-bg: #ffffff;
}

[data-theme="dark"] {
    --primary-color: #e67e63;
    --primary-light: #ff9b7b;
    --primary-dark: #b04b34;
    --secondary-color: #e0e0e0;
    --body-bg: #0f172a;
    --main-bg: #1e293b;
    --header-bg: #1e293b;
    --card-bg: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --border-color: #475569;
    --shadow-color: rgba(0, 0, 0, 0.3);
    --hover-bg: rgba(230, 126, 99, 0.15);
    --input-bg: #475569;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--body-bg);
    color: var(--text-primary);
    line-height: 1.6;
    display: flex;
    min-height: 100vh;
    transition: all var(--transition-speed) ease;
}

/* ===== SIDEBAR ===== */
.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, var(--card-bg) 0%, var(--card-bg) 100%);
    box-shadow: 3px 0 20px var(--shadow-color);
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
    transition: all var(--transition-speed);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 28px 25px 22px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 15px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    flex-direction: column;
}

.institute-logo {
    height: 125px;
    width: auto;
    border-radius: 6px;
  
    padding: 5px;
}

.institute-name {
    color: white;
    font-size: 1.1rem;
    font-weight: 700;
    text-align: center;
    margin-top: 10px;
}

.institute-subtitle {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.8rem;
    text-align: center;
    margin-top: 4px;
    font-weight: 400;
}

.nav-menu {
    padding: 0 18px 20px;
    flex: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 10px;
    margin-bottom: 6px;
    transition: all 0.25s ease;
    cursor: pointer;
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    font-weight: 500;
    width: 100%;
}

.nav-item:hover, .nav-item.active {
    background: linear-gradient(90deg, rgba(176, 75, 52, 0.2) 0%, rgba(176, 75, 52, 0.1) 100%);
    color: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateX(3px);
}

.nav-icon {
    font-size: 17px;
    width: 22px;
    text-align: center;
    color: var(--text-secondary);
    transition: all 0.3s;
}

.nav-item:hover .nav-icon, .nav-item.active .nav-icon {
    color: var(--primary-color);
    transform: scale(1.1);
}

.nav-label {
    font-size: 14.5px;
    flex-grow: 1;
}

/* Dropdown Styles */
.nav-dropdown {
    position: relative;
    margin-bottom: 6px;
}

.dropdown-header {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    gap: 14px;
    position: relative;
}

.dropdown-header:hover, .dropdown-header.active {
    background: linear-gradient(90deg, rgba(176, 75, 52, 0.2) 0%, rgba(176, 75, 52, 0.1) 100%);
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.dropdown-header.active .dropdown-chevron {
    transform: rotate(180deg);
    color: var(--primary-color);
}

.dropdown-header.active .nav-icon {
    color: var(--primary-color);
    transform: scale(1.1);
}

.dropdown-chevron {
    margin-left: auto;
    font-size: 12px;
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    color: var(--text-secondary);
}

/* Enhanced Dropdown Menu */
.dropdown-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1), padding 0.3s ease;
    margin: 4px 0 0 0;
    padding: 0;
    background: var(--main-bg);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 1;
}

.dropdown-menu.show {
    max-height: 300px;
    padding: 8px;
    animation: dropdownSlideDown 0.3s ease;
}

@keyframes dropdownSlideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-item {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 6px;
    margin-bottom: 4px;
    transition: all 0.2s ease;
    font-size: 13.5px;
    background: transparent;
    border: 1px solid transparent;
    font-weight: 500;
}

.dropdown-item:hover, .dropdown-item.active {
    background: var(--hover-bg);
    color: var(--primary-color);
    transform: translateX(4px);
    border-color: var(--primary-light);
}

.dropdown-item i {
    font-size: 14px;
    width: 20px;
    text-align: center;
}

.sidebar-footer {
    padding: 20px 25px;
    font-size: 11px;
    color: var(--text-secondary);
    text-align: center;
    background: var(--main-bg);
    border-top: 1px solid var(--border-color);
    margin-top: auto;
}

/* ===== MAIN CONTENT ===== */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    background-color: var(--main-bg);
    transition: margin-left var(--transition-speed);
    padding-top: 80px;
}

.top-header {
    background: var(--header-bg);
    padding: 18px 35px;
    box-shadow: 0 2px 15px var(--shadow-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    left: var(--sidebar-width);
    right: 0;
    z-index: 990;
    border-bottom: 1px solid var(--border-color);
    transition: all var(--transition-speed);
    height: 80px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.page-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
}

.date-display {
    font-size: 14px;
    color: var(--text-secondary);
    background: var(--main-bg);
    padding: 8px 16px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.date-display i {
    color: var(--primary-color);
    font-size: 12px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 25px;
}

.search-box {
    position: relative;
}

.search-input {
    padding: 11px 15px 11px 45px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    width: 280px;
    font-size: 14px;
    background: var(--input-bg);
    color: var(--text-primary);
    transition: all 0.3s;
    box-shadow: 0 2px 8px var(--shadow-color);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(176, 75, 52, 0.1);
    width: 300px;
}

.search-input::placeholder {
    color: var(--text-secondary);
}

.search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Theme Toggle Button */
.theme-toggle {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.theme-toggle:hover {
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow-color);
    border-color: var(--primary-light);
}

[data-theme="light"] .theme-toggle .fa-sun {
    display: none;
}

[data-theme="light"] .theme-toggle .fa-moon {
    display: block;
}

[data-theme="dark"] .theme-toggle .fa-sun {
    display: block;
}

[data-theme="dark"] .theme-toggle .fa-moon {
    display: none;
}

.notification-bell {
    position: relative;
    font-size: 20px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
}

.notification-bell:hover {
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow-color);
    border-color: var(--primary-light);
}

.notification-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    font-size: 10px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    border: 2px solid var(--header-bg);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 10px;
    background: var(--card-bg);
    transition: all 0.2s;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px var(--shadow-color);
}

.user-profile:hover {
    background: var(--hover-bg);
    border-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow-color);
}

.profile-img {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    object-fit: cover;
    border: 2px solid var(--primary-light);
    box-shadow: 0 2px 8px var(--shadow-color);
}

.profile-info {
    display: flex;
    flex-direction: column;
}

.profile-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
}

.profile-role {
    font-size: 12px;
    color: var(--primary-color);
    font-weight: 500;
    background: rgba(176, 75, 52, 0.1);
    padding: 2px 8px;
    border-radius: 20px;
    display: inline-block;
    margin-top: 3px;
}

.profile-arrow {
    font-size: 12px;
    color: var(--text-secondary);
}

.mobile-menu-toggle {
    display: none;
    font-size: 22px;
    color: var(--primary-color);
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    cursor: pointer;
    padding: 12px;
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1001;
    border-radius: 10px;
    box-shadow: 0 4px 15px var(--shadow-color);
    transition: all 0.3s;
}

.mobile-menu-toggle:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.05);
}

/* ===== PAGE CONTENT ===== */
.page-content {
    padding: 30px;
}

.content-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 10px var(--shadow-color);
    transition: all 0.3s ease;
}

.content-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px var(--shadow-color);
}

.content-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.content-title i {
    color: var(--primary-color);
}

.content-subtitle {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 15px;
}

.content-text {
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 20px;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 25px 0;
}

.stat-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 25px;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px var(--shadow-color);
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-light);
    box-shadow: 0 5px 15px var(--shadow-color);
}

.stat-card i {
    font-size: 32px;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.stat-label {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px var(--shadow-color);
}

.data-table th {
    background: var(--header-bg);
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 2px solid var(--border-color);
}

.data-table td {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
}

.data-table tr:hover {
    background: var(--hover-bg);
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-primary);
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--input-bg);
    color: var(--text-primary);
    font-size: 14px;
    transition: all 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(176, 75, 52, 0.1);
}

.btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(176, 75, 52, 0.3);
}

.btn-secondary {
    background: var(--card-bg);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--hover-bg);
    transform: translateY(-2px);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* Badges */
.badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.bg-success {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
}

.bg-warning {
    background: linear-gradient(135deg, #f39c12, #f1c40f);
    color: white;
}

.bg-info {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
}

/* Quick Links */
.quick-link-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 25px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s ease;
    height: 100%;
    text-align: center;
}

.quick-link-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: 0 5px 15px var(--shadow-color);
    color: var(--primary-color);
}

.quick-link-card i {
    font-size: 32px;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.quick-link-card span {
    font-weight: 600;
    font-size: 14px;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .search-input {
        width: 250px;
    }
    
    .search-input:focus {
        width: 270px;
    }
}

@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
        box-shadow: 5px 0 30px var(--shadow-color);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .mobile-menu-toggle {
        display: block;
    }

    .main-content {
        margin-left: 0;
        width: 100%;
        padding-top: 70px;
    }

    .top-header {
        left: 0;
        padding: 15px 25px;
        height: 70px;
    }

    .search-input {
        width: 200px;
    }

    .search-input:focus {
        width: 220px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .search-input {
        display: none;
    }

    .header-left {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .date-display {
        font-size: 12px;
        padding: 6px 12px;
    }

    .page-title {
        font-size: 20px;
    }

    .profile-info {
        display: none;
    }

    .header-right {
        gap: 15px;
    }

    .theme-toggle,
    .notification-bell {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .user-profile {
        padding: 6px 12px;
    }

    .profile-img {
        width: 38px;
        height: 38px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .page-content {
        padding: 15px;
    }

    .content-card {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .header-right {
        gap: 10px;
    }

    .mobile-menu-toggle {
        top: 15px;
        left: 15px;
        padding: 10px;
    }

    .top-header {
        padding: 12px 15px;
    }
}

/* Custom Scrollbar */
.sidebar::-webkit-scrollbar {
    width: 5px;
}

.sidebar::-webkit-scrollbar-track {
    background: var(--main-bg);
    border-radius: 10px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(176, 75, 52, 0.3);
    border-radius: 10px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(176, 75, 52, 0.5);
}

/* Smooth transitions */
.sidebar,
.top-header,
.nav-item,
.dropdown-header,
.dropdown-menu,
.dropdown-item,
.sidebar-footer,
.search-input,
.theme-toggle,
.notification-bell,
.user-profile,
.date-display,
.content-card,
.stat-card {
    transition: all var(--transition-speed) ease;
}