/* Sidebar width + animation */
#sidebar-wrapper {
    width: 220px;
    transition: width 0.25s ease;
    overflow: hidden;
}

/* Collapsed sidebar */
#sidebar-wrapper.collapsed {
    width: 70px;
}

/* Page content */
#page-content-wrapper {
    width: 100%;
}

/* Sidebar links */
.sidebar-link {
    border: none;
    display: flex;
    align-items: center;
    transition: background-color 0.2s ease, padding-left 0.2s ease;
}

/* Active link */
.sidebar-link.active {
    background-color: var(--accent);
    color: white !important;
    font-weight: bold;
}

/* Hover animation */
.sidebar-link:hover {
    background-color: var(--accent-light);
    padding-left: 18px;
}

/* Icon animation */
#sidebar-wrapper .sidebar-link i {
    margin-right: 12px;
    transition: margin-right 0.25s ease, opacity 0.25s ease;
}

/* Text animation */
.sidebar-link span {
    display: inline-block;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

/* Collapsed: hide text, center icons */
#sidebar-wrapper.collapsed .sidebar-link span {
    opacity: 0;
    transform: translateX(-20px);
}

#sidebar-wrapper.collapsed .sidebar-link {
    justify-content: center;
    text-indent: -9999px;
}

#sidebar-wrapper.collapsed .sidebar-link i {
    margin-right: 0;
    opacity: 1;
    text-indent: 0;
}

/* Section titles */
.sidebar-section-title {
    font-size: 0.75rem;
    font-weight: bold;
    text-transform: uppercase;
    padding: 10px 20px 5px;
    color: var(--text-muted);
    opacity: 0.7;
}

#sidebar-wrapper.collapsed .sidebar-section-title {
    display: none;
}

/* Profile footer */
.sidebar-profile {
    border-top: 1px solid #ddd;
}

#sidebar-wrapper.collapsed .sidebar-profile .profile-name,
#sidebar-wrapper.collapsed .sidebar-profile small {
    display: none;
}

#sidebar-wrapper.collapsed .sidebar-profile img {
    margin: 0 auto;
}

/* Theme icon */
.theme-toggle-icon i {
    font-size: 1.3rem;
    cursor: pointer;
    transition: transform 0.3s ease, color 0.3s ease;
}

.theme-toggle-icon i:hover {
    transform: rotate(20deg);
}

/* Page fade animation */
.page-fade {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.page-fade.page-fade-in {
    opacity: 1;
    transform: translateY(0);
}

/* Loading overlay */
#loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.25);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

#loading-overlay.active {
    display: flex;
}