/**
 * Admin Panel Stylesheet
 * Self-contained, responsive, clean styling built on top of Bootstrap 5.
 * Strictly no external CDN dependencies.
 */

:root {
    --admin-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
    --sidebar-width: 260px;
    --sidebar-collapsed-width: 70px;
    --sidebar-bg: #0f172a;
    --sidebar-text: #94a3b8;
    --sidebar-hover-bg: #1e293b;
    --sidebar-hover-text: #f8fafc;
    --sidebar-active-bg: #4f46e5;
    --sidebar-active-text: #ffffff;
    --topbar-height: 64px;
    --topbar-bg: #ffffff;
    --body-bg: #f8fafc;
    --card-bg: #ffffff;
    --card-border: #e2e8f0;
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --primary-color: #4f46e5;
    --primary-hover: #4338ca;
    --primary-light: #eef2ff;
}

body {
    font-family: var(--admin-font);
    background-color: var(--body-bg);
    color: #1e293b;
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
}

/* ==========================================================================
   Admin Wrapper & Layout
   ========================================================================== */
.admin-wrapper {
    display: flex;
    min-height: 100vh;
    position: relative;
}

.admin-sidebar {
    width: var(--sidebar-width);
    background-color: var(--sidebar-bg);
    color: var(--sidebar-text);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 10000;
    transition: width 0.28s cubic-bezier(0.4, 0, 0.2, 1), transform 0.28s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.28s ease;
    box-shadow: 2px 0 12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.sidebar-header {
    height: var(--topbar-height);
    display: flex;
    align-items: center;
    padding: 0 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: #ffffff;
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: -0.025em;
}

.sidebar-brand img,
.sidebar-brand .brand-logo-full {
    height: 46px;
    max-height: 48px;
    width: auto;
    max-width: 195px;
    object-fit: contain;
    background-color: #ffffff;
    border-radius: 8px;
    padding: 3px 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.16);
    display: inline-block;
}

.sidebar-brand .brand-logo-mini {
    display: none !important;
    width: 40px;
    height: 40px;
    object-fit: contain;
    background-color: #ffffff;
    border-radius: 8px;
    padding: 3px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.16);
}

.sidebar-menu {
    flex: 1;
    padding: 1.25rem 0.75rem;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}

/* Custom Sleek Dark Scrollbar for Sidebar Menu */
.sidebar-menu::-webkit-scrollbar {
    width: 5px;
}

.sidebar-menu::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-menu::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.18);
    border-radius: 9999px;
}

.sidebar-menu::-webkit-scrollbar-thumb:hover {
    background-color: rgba(255, 255, 255, 0.38);
}

.sidebar-menu-title {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    padding: 0.75rem 0.85rem 0.35rem;
}

.sidebar-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-nav-item {
    margin-bottom: 0.25rem;
}

.sidebar-nav-link {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.65rem 0.85rem;
    border-radius: 0.5rem;
    color: var(--sidebar-text);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.sidebar-nav-link i {
    width: 20px;
    text-align: center;
    font-size: 1rem;
    opacity: 0.85;
}

.sidebar-nav-link:hover {
    background-color: var(--sidebar-hover-bg);
    color: var(--sidebar-hover-text);
}

.sidebar-nav-link.active {
    background-color: var(--sidebar-active-bg);
    color: var(--sidebar-active-text);
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.35);
}

.sidebar-nav-link.active i {
    opacity: 1;
}

.sidebar-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    background-color: rgba(0, 0, 0, 0.15);
}

.sidebar-user-pill {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sidebar-user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    background: #1e293b;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.sidebar-user-info {
    overflow: hidden;
}

.sidebar-user-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: #f1f5f9;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.sidebar-user-role {
    font-size: 0.72rem;
    color: #38bdf8;
    text-transform: capitalize;
}

/* ==========================================================================
   Admin Main Section (Topbar + Content + Footer)
   ========================================================================== */
.admin-main {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-width: 0;
    max-width: calc(100% - var(--sidebar-width));
    width: calc(100% - var(--sidebar-width));
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Topbar Header */
.admin-topbar {
    height: var(--topbar-height);
    background-color: var(--topbar-bg);
    border-bottom: 1px solid var(--card-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    position: sticky;
    top: 0;
    z-index: 9999;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.sidebar-toggle-btn {
    border: none;
    background: #f1f5f9;
    color: #475569;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sidebar-toggle-btn:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.topbar-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: #0f172a;
    margin: 0;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-dropdown-btn {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    padding: 0.4rem 0.85rem;
    border-radius: 9999px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    color: #334155;
}

.user-dropdown-btn:hover,
.user-dropdown-btn[aria-expanded="true"] {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #0f172a;
}

.user-dropdown-btn img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
}

.user-dropdown-btn .user-name {
    font-size: 0.875rem;
    font-weight: 600;
}

/* ==========================================================================
   Page Content Area
   ========================================================================== */
.admin-content {
    flex: 1;
    padding: 1.75rem;
}

.page-header {
    margin-bottom: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.page-title {
    font-size: 1.45rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
    letter-spacing: -0.02em;
}

.page-subtitle {
    font-size: 0.875rem;
    color: #64748b;
    margin-top: 0.25rem;
    margin-bottom: 0;
}

/* ==========================================================================
   Cards & Widgets
   ========================================================================== */
.admin-card {
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 0.75rem;
    box-shadow: var(--card-shadow);
    margin-bottom: 1.5rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.admin-card-header {
    padding: 1.15rem 1.5rem;
    border-bottom: 1px solid var(--card-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.admin-card-header .card-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: #0f172a;
    margin: 0;
}

.admin-card-body {
    padding: 1.5rem;
}

/* Metric / Stat Card */
.stat-card {
    position: relative;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid var(--card-border);
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: var(--card-shadow);
    transition: all 0.25s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
}

.stat-card-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.stat-card-title {
    font-size: 0.82rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.5rem;
}

.stat-card-value {
    font-size: 1.85rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
    margin: 0;
}

.stat-card-desc {
    font-size: 0.8rem;
    color: #94a3b8;
    margin-top: 0.4rem;
    margin-bottom: 0;
}

.stat-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
}

.stat-icon-indigo {
    background-color: #eef2ff;
    color: #4f46e5;
}

.stat-icon-emerald {
    background-color: #ecfdf5;
    color: #059669;
}

.stat-icon-sky {
    background-color: #f0f9ff;
    color: #0284c7;
}

.stat-icon-amber {
    background-color: #fffbeb;
    color: #d97706;
}

/* Quick Action Buttons */
.quick-action-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 1.15rem;
    border: 1px solid var(--card-border);
    border-radius: 0.65rem;
    background-color: #ffffff;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    width: 100%;
    text-align: left;
}

.quick-action-link:hover {
    border-color: #cbd5e1;
    background-color: #f8fafc;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.quick-action-link.action-warning .stat-icon-amber {
    background-color: #fffbeb;
    color: #d97706;
}

.quick-action-link.action-warning:hover {
    border-color: #fde68a;
    background-color: #fffdf5;
}

.quick-action-link.action-warning:hover .stat-icon-amber {
    background-color: #fef3c7;
    color: #b45309;
}

.quick-action-link.action-danger {
    border-color: #fee2e2;
    background-color: #ffffff;
}

.quick-action-link.action-danger .stat-card-icon {
    background-color: #fef2f2;
    color: #dc2626;
}

.quick-action-link.action-danger:hover {
    border-color: #fca5a5;
    background-color: #fef2f2;
}

.quick-action-link.action-danger:hover .stat-card-icon {
    background-color: #fee2e2;
    color: #b91c1c;
}

.quick-action-link .action-title {
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.15rem;
}

.quick-action-link.action-danger .action-title {
    color: #dc2626;
    font-weight: 600;
}

.quick-action-link .action-subtitle {
    font-size: 0.825rem;
    color: #64748b;
    margin: 0;
}


/* ==========================================================================
   Admin Footer
   ========================================================================== */
.admin-footer {
    background-color: #ffffff;
    border-top: 1px solid var(--card-border);
    padding: 1rem 1.75rem;
    font-size: 0.85rem;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* ==========================================================================
   Login Page Styling (Modern, Clean, Professional)
   ========================================================================== */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 10% 20%, #1e1b4b 0%, #0f172a 90%);
    padding: 1.5rem;
}

.auth-card {
    width: 100%;
    max-width: 440px;
    background: #ffffff;
    border-radius: 1rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-header {
    text-align: center;
    padding: 2.25rem 2rem 1.25rem;
}

.auth-logo {
    display: inline-block;
    margin-bottom: 1rem;
}

.auth-logo img {
    height: 100px;
    width: auto;
}

.auth-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.025em;
    margin-bottom: 0.25rem;
}

.auth-subtitle {
    font-size: 0.875rem;
    color: #64748b;
    margin: 0;
}

.auth-body {
    padding: 1.5rem 2rem 2.25rem;
}

/* Form Styles */
.form-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.4rem;
}

.form-control {
    border: 1.5px solid #cbd5e1;
    border-radius: 0.5rem;
    padding: 0.65rem 0.9rem;
    font-size: 0.925rem;
    color: #0f172a;
    transition: all 0.2s ease;
}

.form-control:focus {
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
    outline: none;
}

.input-group-text {
    background-color: #f8fafc;
    border: 1.5px solid #cbd5e1;
    color: #64748b;
    border-radius: 0.5rem;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    padding: 0.65rem 1.25rem;
    font-weight: 600;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
}

.password-toggle-btn {
    border: 1.5px solid #cbd5e1 !important;
    border-left: none !important;
    background-color: #ffffff !important;
    color: #64748b !important;
    cursor: pointer;
    box-shadow: none !important;
    border-top-right-radius: 0.5rem !important;
    border-bottom-right-radius: 0.5rem !important;
    padding: 0.65rem 0.95rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out;
}

.password-toggle-btn:hover {
    background-color: #f1f5f9 !important;
    border-color: #cbd5e1 !important;
    color: #4f46e5 !important;
}

.password-toggle-btn:focus,
.password-toggle-btn:active {
    background-color: #f8fafc !important;
    border-color: #4f46e5 !important;
    color: #4f46e5 !important;
    box-shadow: none !important;
}

.password-toggle-btn:hover:focus,
.password-toggle-btn:hover:active {
    background-color: #f1f5f9 !important;
    color: #4338ca !important;
}

.password-toggle-btn i {
    color: inherit !important;
    font-size: 0.95rem;
    pointer-events: none;
}

.form-control:focus~.password-toggle-btn {
    border-color: #4f46e5 !important;
}

.form-control.is-invalid~.password-toggle-btn {
    border-color: #dc3545 !important;
}

/* ==========================================================================
   Alerts & Notifications
   ========================================================================== */
.admin-alert {
    border-radius: 0.5rem;
    padding: 0.9rem 1.15rem;
    font-size: 0.875rem;
    margin-bottom: 1.25rem;
    border: 1px solid transparent;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.admin-alert i {
    font-size: 1.15rem;
    margin-top: 0.1rem;
}

.admin-alert-success {
    background-color: #ecfdf5;
    border-color: #a7f3d0;
    color: #065f46;
}

.admin-alert-danger {
    background-color: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

.admin-alert-warning {
    background-color: #fffbeb;
    border-color: #fde68a;
    color: #92400e;
}

.admin-alert-info {
    background-color: #eff6ff;
    border-color: #bfdbfe;
    color: #1e40af;
}

/* ==========================================================================
/* ==========================================================================
   Responsive & Sidebar Toggle (Desktop + Mobile)
   ========================================================================== */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(2px);
    z-index: 1030;
    transition: opacity 0.3s ease;
}

/* Desktop Mini-Sidebar / Icon-Only Collapsed State (>= 992px) */
@media (min-width: 992px) {

    body.sidebar-collapsed .admin-sidebar,
    .admin-wrapper.sidebar-collapsed .admin-sidebar {
        transform: translateX(0) !important;
        width: var(--sidebar-collapsed-width, 70px) !important;
        z-index: 10000;
        transition: width 0.28s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.28s ease;
    }

    body.sidebar-collapsed .admin-main,
    .admin-wrapper.sidebar-collapsed .admin-main {
        margin-left: var(--sidebar-collapsed-width, 70px) !important;
        max-width: calc(100% - var(--sidebar-collapsed-width, 70px)) !important;
        width: calc(100% - var(--sidebar-collapsed-width, 70px)) !important;
        transition: margin-left 0.28s cubic-bezier(0.4, 0, 0.2, 1), width 0.28s cubic-bezier(0.4, 0, 0.2, 1), max-width 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    }

    /* In non-hovered collapsed state, show only icons */
    body.sidebar-collapsed .admin-sidebar:not(:hover):not(.sidebar-hover-expanded) .sidebar-header {
        justify-content: center !important;
        padding: 0 0.5rem;
    }

    body.sidebar-collapsed .admin-sidebar:not(:hover):not(.sidebar-hover-expanded) .sidebar-brand {
        justify-content: center;
        width: 100%;
    }

    body.sidebar-collapsed .admin-sidebar:not(:hover):not(.sidebar-hover-expanded) .sidebar-brand img {
        width: 40px;
        height: 40px;
        object-fit: contain;
        border-radius: 8px;
        padding: 3px;
        background-color: #ffffff;
        margin: 0 auto;
    }

    body.sidebar-collapsed .admin-sidebar:not(:hover):not(.sidebar-hover-expanded) .sidebar-brand .brand-logo-full {
        display: none !important;
    }

    body.sidebar-collapsed .admin-sidebar:not(:hover):not(.sidebar-hover-expanded) .sidebar-brand .brand-logo-mini {
        display: inline-block !important;
        width: 40px !important;
        height: 40px !important;
        max-width: 40px !important;
        object-fit: contain !important;
        border-radius: 8px;
        padding: 3px;
        background-color: #ffffff;
        margin: 0 auto;
    }

    body.sidebar-collapsed .admin-sidebar:not(:hover):not(.sidebar-hover-expanded) .sidebar-menu {
        padding: 1rem 0.5rem;
        overflow-x: hidden;
    }

    body.sidebar-collapsed .admin-sidebar:not(:hover):not(.sidebar-hover-expanded) .sidebar-menu-title {
        display: none !important;
    }

    body.sidebar-collapsed .admin-sidebar:not(:hover):not(.sidebar-hover-expanded) .sidebar-nav-item {
        margin-bottom: 0.5rem;
        display: flex;
        justify-content: center;
    }

    body.sidebar-collapsed .admin-sidebar:not(:hover):not(.sidebar-hover-expanded) .sidebar-nav-link {
        width: 44px;
        height: 44px;
        padding: 0 !important;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 0.5rem;
        gap: 0;
        margin: 0 auto;
        position: relative;
    }

    body.sidebar-collapsed .admin-sidebar:not(:hover):not(.sidebar-hover-expanded) .sidebar-nav-link span,
    body.sidebar-collapsed .admin-sidebar:not(:hover):not(.sidebar-hover-expanded) .sidebar-nav-link .submenu-arrow {
        display: none !important;
        opacity: 0;
        visibility: hidden;
    }

    body.sidebar-collapsed .admin-sidebar:not(:hover):not(.sidebar-hover-expanded) .sidebar-nav-link i {
        font-size: 1.15rem;
        width: 100%;
        text-align: center;
        margin: 0;
    }

    body.sidebar-collapsed .admin-sidebar:not(:hover):not(.sidebar-hover-expanded) #sidebarLogoutForm {
        width: 100%;
        display: flex;
        justify-content: center;
    }

    /* Submenus are hidden in collapsed non-hover state */
    body.sidebar-collapsed .admin-sidebar:not(:hover):not(.sidebar-hover-expanded) .collapse,
    body.sidebar-collapsed .admin-sidebar:not(:hover):not(.sidebar-hover-expanded) .sidebar-submenu {
        display: none !important;
    }

    /* Footer avatar in collapsed state */
    body.sidebar-collapsed .admin-sidebar:not(:hover):not(.sidebar-hover-expanded) .sidebar-footer {
        padding: 0.75rem 0.5rem;
        display: flex;
        justify-content: center;
    }

    body.sidebar-collapsed .admin-sidebar:not(:hover):not(.sidebar-hover-expanded) .sidebar-user-pill {
        justify-content: center;
        gap: 0;
        width: 100%;
    }

    body.sidebar-collapsed .admin-sidebar:not(:hover):not(.sidebar-hover-expanded) .sidebar-user-info {
        display: none !important;
    }

    /* HOVER TO EXPAND (Floating open on mouse hover) */
    body.sidebar-collapsed .admin-sidebar:hover,
    body.sidebar-collapsed .admin-sidebar.sidebar-hover-expanded,
    .admin-wrapper.sidebar-collapsed .admin-sidebar:hover,
    .admin-wrapper.sidebar-collapsed .admin-sidebar.sidebar-hover-expanded {
        width: var(--sidebar-width, 260px) !important;
        box-shadow: 6px 0 25px rgba(0, 0, 0, 0.4) !important;
        z-index: 10050 !important;
    }

    body.sidebar-collapsed .admin-sidebar:hover .sidebar-header,
    body.sidebar-collapsed .admin-sidebar.sidebar-hover-expanded .sidebar-header {
        justify-content: space-between !important;
        padding: 0 1.25rem !important;
    }

    body.sidebar-collapsed .admin-sidebar:hover .sidebar-brand img,
    body.sidebar-collapsed .admin-sidebar.sidebar-hover-expanded .sidebar-brand img,
    .admin-wrapper.sidebar-collapsed .admin-sidebar:hover .sidebar-brand img,
    .admin-wrapper.sidebar-collapsed .admin-sidebar.sidebar-hover-expanded .sidebar-brand img {
        width: auto !important;
        height: 46px !important;
        max-height: 48px !important;
        max-width: 195px !important;
        object-fit: contain !important;
    }

    body.sidebar-collapsed .admin-sidebar:hover .sidebar-brand .brand-logo-full,
    body.sidebar-collapsed .admin-sidebar.sidebar-hover-expanded .sidebar-brand .brand-logo-full,
    .admin-wrapper.sidebar-collapsed .admin-sidebar:hover .sidebar-brand .brand-logo-full,
    .admin-wrapper.sidebar-collapsed .admin-sidebar.sidebar-hover-expanded .sidebar-brand .brand-logo-full {
        display: inline-block !important;
        width: auto !important;
        height: 46px !important;
        max-height: 48px !important;
        max-width: 195px !important;
        object-fit: contain !important;
    }

    body.sidebar-collapsed .admin-sidebar:hover .sidebar-brand .brand-logo-mini,
    body.sidebar-collapsed .admin-sidebar.sidebar-hover-expanded .sidebar-brand .brand-logo-mini,
    .admin-wrapper.sidebar-collapsed .admin-sidebar:hover .sidebar-brand .brand-logo-mini,
    .admin-wrapper.sidebar-collapsed .admin-sidebar.sidebar-hover-expanded .sidebar-brand .brand-logo-mini {
        display: none !important;
    }

    body.sidebar-collapsed .admin-sidebar:hover .sidebar-menu,
    body.sidebar-collapsed .admin-sidebar.sidebar-hover-expanded .sidebar-menu {
        padding: 1.25rem 0.75rem !important;
    }

    body.sidebar-collapsed .admin-sidebar:hover .sidebar-menu-title,
    body.sidebar-collapsed .admin-sidebar.sidebar-hover-expanded .sidebar-menu-title {
        display: block !important;
        animation: sidebarFadeIn 0.2s ease forwards;
    }

    body.sidebar-collapsed .admin-sidebar:hover .sidebar-nav-item,
    body.sidebar-collapsed .admin-sidebar.sidebar-hover-expanded .sidebar-nav-item {
        display: block !important;
        margin-bottom: 0.25rem !important;
    }

    body.sidebar-collapsed .admin-sidebar:hover .sidebar-nav-link,
    body.sidebar-collapsed .admin-sidebar.sidebar-hover-expanded .sidebar-nav-link {
        width: 100% !important;
        height: auto !important;
        padding: 0.65rem 0.85rem !important;
        display: flex !important;
        align-items: center !important;
        justify-content: flex-start !important;
        gap: 0.85rem !important;
    }

    body.sidebar-collapsed .admin-sidebar:hover .sidebar-nav-link i,
    body.sidebar-collapsed .admin-sidebar.sidebar-hover-expanded .sidebar-nav-link i {
        width: 20px !important;
        font-size: 1rem !important;
        margin: 0 !important;
        text-align: center !important;
    }

    body.sidebar-collapsed .admin-sidebar:hover .sidebar-nav-link span,
    body.sidebar-collapsed .admin-sidebar.sidebar-hover-expanded .sidebar-nav-link span {
        display: inline-block !important;
        opacity: 1 !important;
        visibility: visible !important;
        white-space: nowrap !important;
        animation: sidebarFadeIn 0.2s ease forwards;
    }

    body.sidebar-collapsed .admin-sidebar:hover .sidebar-nav-link .submenu-arrow,
    body.sidebar-collapsed .admin-sidebar.sidebar-hover-expanded .sidebar-nav-link .submenu-arrow {
        display: inline-block !important;
        opacity: 1 !important;
        visibility: visible !important;
        margin-left: auto !important;
    }

    body.sidebar-collapsed .admin-sidebar:hover .collapse.show,
    body.sidebar-collapsed .admin-sidebar.sidebar-hover-expanded .collapse.show {
        display: block !important;
    }

    body.sidebar-collapsed .admin-sidebar:hover .sidebar-submenu,
    body.sidebar-collapsed .admin-sidebar.sidebar-hover-expanded .sidebar-submenu {
        display: block !important;
    }

    body.sidebar-collapsed .admin-sidebar:hover #sidebarLogoutForm,
    body.sidebar-collapsed .admin-sidebar.sidebar-hover-expanded #sidebarLogoutForm {
        width: 100% !important;
    }

    body.sidebar-collapsed .admin-sidebar:hover .sidebar-footer,
    body.sidebar-collapsed .admin-sidebar.sidebar-hover-expanded .sidebar-footer {
        padding: 1rem 1.25rem !important;
        display: block !important;
    }

    body.sidebar-collapsed .admin-sidebar:hover .sidebar-user-pill,
    body.sidebar-collapsed .admin-sidebar.sidebar-hover-expanded .sidebar-user-pill {
        justify-content: flex-start !important;
        gap: 0.75rem !important;
    }

    body.sidebar-collapsed .admin-sidebar:hover .sidebar-user-info,
    body.sidebar-collapsed .admin-sidebar.sidebar-hover-expanded .sidebar-user-info {
        display: block !important;
        animation: sidebarFadeIn 0.2s ease forwards;
    }
}

@keyframes sidebarFadeIn {
    from {
        opacity: 0;
        transform: translateX(-4px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Mobile & Tablet Drawer Behavior (< 992px) */
@media (max-width: 991.98px) {
    .admin-sidebar {
        transform: translateX(-100%);
    }

    .admin-sidebar.show {
        transform: translateX(0);
    }

    .admin-main {
        margin-left: 0;
        max-width: 100%;
        width: 100%;
    }

    .sidebar-overlay.show {
        display: block;
    }

    .admin-content {
        padding: 1.25rem 1rem;
    }
}

@media (max-width: 575.98px) {
    .admin-content {
        padding: 1rem 0.75rem;
    }

    .admin-topbar {
        padding: 0 0.85rem;
    }
}