/* AEM Labs - Dashboard Base CSS */
/* ============================= */

#recommendations-carousel.carousel-container {
    max-width: 100%;
    margin: 0;
    box-shadow: none;
}

.dashboard-container {
    display: flex;
    min-height: calc(100vh - 120px);
}

.dashboard-main {
    flex: 1;
    margin-left: 250px;
    padding: 24px;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.dashboard-main.sidebar-retracted {
    margin-left: 70px;
}

/* Dashboard Sidebar */
.dashboard-sidebar {
    width: 250px;
    background: white;
    border-right: 1px solid #e9ecef;
    padding: 24px 0;
    position: fixed;
    height: calc(100vh - 120px);
    overflow-y: auto;
    z-index: 100;
    transition: all 0.3s ease;
    border-radius: 0;
}

/* Sidebar Toggle Button */
.sidebar-toggle {
    position: fixed;
    top: 21%;
    left: 250px;
    width: 25px;
    height: 40px;
    background: white;
    border: 1px solid #e9ecef;
    border-left: none;
    border-radius: 0 8px 8px 0;
    color: var(--accent-color);
    font-size: 10px;
    cursor: pointer;
    z-index: 1000000;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-toggle:hover {
    background: var(--accent-color);
    color: white;
    box-shadow: 2px 0 12px rgba(0, 0, 0, 0.15);
}

.sidebar-toggle:active {
    background: #e9ecef;
    transform: scale(0.98);
}

/* Retracted Sidebar Styles */
.dashboard-sidebar.retracted {
    width: 70px;
}

.dashboard-sidebar.retracted .sidebar-toggle {
    left: 70px;
}

.dashboard-sidebar.retracted .sidebar-toggle i {
    transform: rotate(180deg);
}

.dashboard-sidebar.retracted .role-switcher,
.dashboard-sidebar.retracted .nav-section-title,
.dashboard-sidebar.retracted .nav-link span,
.dashboard-sidebar.retracted .nav-badge,
.dashboard-sidebar.retracted .profile-info {
    display: none;
}

.dashboard-sidebar.retracted .dashboard-nav {
    padding: 0;
}

.dashboard-sidebar.retracted .nav-section {
    margin-bottom: 10px;
}

.dashboard-sidebar.retracted .nav-section:first-child {
    border-bottom: 1px solid #e9ecef;
}

.dashboard-sidebar.retracted .nav-link {
    justify-content: center;
    align-items: center;
    padding: 0;
    margin-bottom: 0;
    border-radius: 50%;
    display: flex;
    width: 40px;
    height: 40px;
    margin: 0 auto 8px auto;
}


.dashboard-sidebar.retracted .nav-link i {
    margin: 0;
    width: 100%;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dashboard-sidebar.retracted .nav-item {
    margin-bottom: 0;
}

.dashboard-sidebar.retracted .user-profile-summary {
    padding: 16px 8px;
    text-align: center;
}

.dashboard-sidebar.retracted .profile-avatar {
    margin-bottom: 0;
}

.dashboard-sidebar.retracted .profile-avatar img {
    width: 40px;
    height: 40px;
}

.role-switcher {
    padding: 0 24px 16px;
    border-bottom: 1px solid #e9ecef;
    margin-bottom: 24px;
}

.role-toggle {
    display: flex;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 4px;
}

.role-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 12px;
    border: none;
    background: transparent;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    color: #6c757d;
    cursor: pointer;
    transition: all 0.2s ease;
}

.role-btn.active {
    background: white;
    color: var(--accent-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.role-btn:hover:not(.active) {
    color: #495057;
}

.dashboard-nav {
    padding: 0 16px;
}

.nav-section {
    margin-bottom: 24px;
}

.nav-section-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: #6c757d;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-item {
    margin-bottom: 4px;
}

#dashboardSidebar .nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    color: #495057;
    text-decoration: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
    position: relative;
}

#dashboardSidebar .nav-link:hover {
    background: #f8f9fa;
    color: var(--accent-color);
    text-decoration: none;
}

#dashboardSidebar .nav-link.active {
    background: var(--accent-color);
    color: #fff;
}

#dashboardSidebar .nav-link i {
    width: 20px;
    text-align: center;
    font-size: 14px;
}

#dashboardSidebar .nav-section .nav-badge {
    background: #dc3545;
    color: #fff;
    font-size: 9px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: auto;
}

#dashboardSidebar .nav-section .nav-link.active .nav-badge {
    background: rgba(255, 255, 255, 0.2);
}

.user-profile-summary {
    padding: 20px;
    border-top: 1px solid #e9ecef;
    margin-top: auto;
}

.profile-avatar {
    text-align: center;
    margin-bottom: 12px;
}

.profile-avatar img {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 50%;
}

.profile-avatar i {
    font-size: 42px;
    color: #6c757d;
}

.profile-info {
    text-align: center;
}

.profile-name {
    font-size: 14px;
    font-weight: 600;
    color: #212529;
    margin-bottom: 4px;
}

.profile-email {
    font-size: 12px;
    color: #6c757d;
    margin-bottom: 8px;
}

.seller-rating {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 12px;
    color: #ffc107;
}

/* Dashboard Header */
.dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e9ecef;
}

.dashboard-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #6c757d;
}

.breadcrumb-item.active {
    color: #212529;
    font-weight: 500;
}

.dashboard-actions {
    display: flex;
    gap: 12px;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    border: none;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.action-btn.primary {
    background: var(--accent-color);
    color: white;
    padding: 8px 12px;
}

.action-btn.primary:hover {
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.25);
}

.action-btn.secondary {
    background: #f8f9fa;
    color: #6c757d;
    border: 1px solid #e9ecef;
    padding: 8px;
}

.action-btn.secondary:hover {
    background: #e9ecef;
    color: #495057;
}

.dashboard-content {
    max-width: 100%;
}

/* Welcome Section */
.welcome-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(270deg, var(--accent-color), var(--accent-color));
    color: white;
    padding: 16px 24px;
    border-radius: 20px;
    margin-bottom: 24px;
}

.welcome-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
}

.welcome-subtitle {
    font-size: 13px;
    opacity: 0.9;
    margin: 0;
}

.welcome-actions .btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 10px 20px;
    font-size: 12px;
    border-radius: 12px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.welcome-actions .btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* Page Header */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e9ecef;
}

.page-title {
    font-size: 24px;
    font-weight: 700;
    color: #212529;
    margin-bottom: 6px;
}

.page-subtitle {
    color: #6c757d;
    margin: 0;
    font-size: 12px;
}

.page-actions {
    display: flex;
    gap: 12px;
}

.page-actions .btn {
    display: flex;
    align-items: center;
    gap: 8px;
    border-radius: 12px;
}

.header-btn,
.header-btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.header-btn {
    border: none;
    background-color: var(--accent-color);
    color: white;
}

.header-btn:hover {
    background: var(--accent-color);
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.25);
}

.header-btn-outline {
    background: transparent;
    color: var(--accent-color);
    border: 1px solid var(--accent-color);
}

.header-btn-outline:hover {
    background: var(--accent-color);
    color: white;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.25);
}

/* Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary {
    background: var(--accent-color);
    border: 1px solid var(--accent-color);
    color: white;
}

.btn-primary:hover {
    text-decoration: none;
}

.btn-outline {
    background: transparent;
    color: var(--accent-color);
    border: 1px solid var(--accent-color);
}

.btn-outline:hover {
    background: var(--accent-color);
    color: white;
    text-decoration: none;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

/* Dashboard Stats */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 24px;
}

.stat-card {
    background: white;
    padding: 12px 16px;
    border-radius: 16px;
    border: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.stat-icon {
    width: 42px;
    height: 42px;
    background: #e2e3e4;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--accent-color);
}

.stat-content {
    flex: 1;
}

.stat-header {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 4px;
}

.stat-number {
    font-size: 18px;
    font-weight: 700;
    color: #212529;
}

.stat-label {
    font-size: 11px;
    font-weight: 500;
    color: #6c757d;
}

.stat-change {
    font-size: 10px;
    font-weight: 600;
    color: rgb(204, 0, 0);
}

.stat-change.positive {
    color: #28a745;
}

/* Dashboard Content */
.dashboard-main-content {
    width: 100%;
    display: grid;
    gap: 24px;
}

/* Empty States */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    background: white;
    border-radius: 16px;
    margin: 0;
}

.empty-icon {
    margin-bottom: 16px;
}

.empty-icon i {
    font-size: 42px;
    color: #6c757d;
}

.empty-state h3 {
    font-size: 18px;
    font-weight: 600;
    color: #212529;
    margin-bottom: 12px;
}

.empty-state p {
    font-size: 14px;
    color: #6c757d;
    margin-bottom: 20px;
}

.empty-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.empty-btn-solid,
.empty-btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 12px;
    text-decoration: none;
    font-size: 11px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    cursor: pointer;
}

.empty-btn-solid i,
.empty-btn-outline i {
    font-size: 11px;
}

.empty-btn-solid {
    background: var(--accent-color);
    color: white;
}

.empty-btn-solid:hover {
    background: var(--accent-color);
    transform: translateY(-1px);
}

.empty-btn-outline {
    background: transparent;
    color: var(--accent-color);
    border-color: var(--accent-color);
}

.empty-btn-outline:hover {
    background: var(--accent-color);
    color: white;
    transform: translateY(-1px);
}

@media (max-width: 1400px) {
    .dashboard-main {
        margin-left: 225px;
        padding-top: 20px;
    }

    .dashboard-main-content {
        gap: 16px;
    }

    .dashboard-header,
    .page-header {
        padding-bottom: 8px;
        margin-bottom: 12px;
    }

    .dashboard-sidebar {
        width: 225px;
    }

    .dashboard-sidebar.retracted {
        width: 65px;
        padding: 20px 6px;
    }

    .dashboard-main.sidebar-retracted {
        margin-left: 65px;
    }

    .sidebar-toggle {
        top: 25%;
        left: 225px;
    }

    .dashboard-sidebar.retracted .sidebar-toggle {
        left: 65px;
    }

    .dashboard-sidebar.retracted .nav-link {
        width: 30px;
        height: 30px;
    }

    .dashboard-sidebar.retracted .nav-link i {
        font-size: 12px;
    }

    .dashboard-sidebar.retracted .profile-avatar img {
        width: 36px;
        height: 36px;
    }

    .role-switcher {
        margin-bottom: 16px;
    }

    .role-btn {
        font-size: 11px;
        padding: 6px 8px;
    }

    .nav-section-title {
        font-size: 10px;
    }

    #dashboardSidebar .nav-link {
        font-size: 12px;
        gap: 8px;
    }

    #dashboardSidebar .nav-link i {
        font-size: 13px;
    }

    #dashboardSidebar .nav-badge {
        font-size: 8px;
        padding: 2px 4px;
    }

    .profile-name {
        font-size: 13px;
    }

    .welcome-section {
        padding: 14px 18px;
        margin-bottom: 16px;
    }

    .welcome-title,
    .page-title {
        font-size: 20px;
    }

    .dashboard-stats {
        gap: 16px;
        margin-bottom: 16px;
    }

    .stat-card {
        padding: 10px 12px;
        gap: 10px;
    }

    .stat-icon {
        width: 38px;
        height: 38px;
    }

    .stat-number {
        font-size: 16px;
    }

    .stat-change {
        font-size: 9px;
    }

    .stat-label {
        font-size: 10px;
    }

    .page-subtitle {
        font-size: 10px;
    }

    .page-actions {
        gap: 8px;
    }

    .header-btn,
    .header-btn-outline {
        padding: 6px 10px;
    }

    .empty-btn-solid,
    .empty-btn-outline {
        padding: 4px 8px;
        font-size: 10px;
        border-radius: 10px;
        gap: 6px;
    }

    .empty-btn-solid i,
    .empty-btn-outline i {
        font-size: 10px;
    }
}

@media (max-width: 992px) {
    .dashboard-container {
        margin-top: 16px;
    }

    .dashboard-sidebar {
        width: 215px;
    }

    .sidebar-toggle {
        left: 215px;
    }

    .dashboard-main {
        margin-left: 215px;
    }

    .dashboard-sidebar.retracted {
        width: 60px;
        padding: 16px 6px;
    }

    .dashboard-main.sidebar-retracted {
        margin-left: 60px;
    }

    .dashboard-sidebar.retracted .nav-link {
        padding: 8px 6px;
    }

    .dashboard-sidebar.retracted .profile-avatar img {
        width: 35px;
        height: 35px;
    }

    .dashboard-sidebar.retracted .sidebar-toggle {
        left: 60px;
    }

    .dashboard-stats {
        gap: 12px;
        grid-template-columns: repeat(2, 1fr);
    }

    .welcome-title, .page-title {
        font-size: 18px;
    }

    .welcome-actions .btn {
        padding: 8px 12px;
        font-size: 10px;
        gap: 8px;
    }

    .page-actions {
        border-radius: 8px;
    }
}

@media (max-width: 768px) {
    .dashboard-container {
        margin-top: -8px;
    }

    .filter-form label {
        font-size: 10px !important;
    }

    .filter-form select {
        font-size: 10px;
        padding: 6px 10px;
        border-radius: 10px;
        min-width: fit-content;
    }

    .empty-state p {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .dashboard-main {
        margin-left: 0;
        padding: 10px 16px 16px;
        width: 100%;
    }

    .dashboard-main-content {
        gap: 10px;
    }

    .dashboard-main.sidebar-retracted {
        margin-left: 0;
    }

    /* Mobile Sidebar Styles */
    .dashboard-sidebar {
        position: fixed;
        top: 0;
        left: -280px;
        width: 280px;
        height: 100vh;
        background: white;
        z-index: 10000;
        box-shadow: 2px 0 20px rgba(0, 0, 0, 0.1);
        overflow-y: auto;
        border-right: 1px solid #e9ecef;
        transition: left 0.3s ease;
    }

    .dashboard-sidebar.mobile-open {
        left: 0 !important;
        box-shadow: 2px 0 20px rgba(0, 0, 0, 0.3);
    }

    .dashboard-sidebar.retracted {
        left: -280px;
        width: 280px;
    }

    .dashboard-sidebar.retracted.mobile-open {
        left: 0;
    }

    .dashboard-sidebar.mobile-open .sidebar-toggle {
        left: 280px;
    }

    .sidebar-toggle {
        position: fixed;
        top: 95px;
        left: 0;
        width: 25px;
        height: 30px;
        background: white;
        border: 1px solid #e9ecef;
        border-radius: 0 8px 8px 0;
        color: var(--accent-color);
        font-size: 11px;
        cursor: pointer;
        z-index: 10002;
        box-shadow: 0 0 6px rgba(0, 0, 0, 0.1);
        transition: all 0.3s ease;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .sidebar-toggle:hover {
        background: var(--accent-color);
        color: white;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    }

    .mobile-sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 9999;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }

    .mobile-sidebar-overlay.active {
        opacity: 1;
        visibility: visible;
    }

    .dashboard-sidebar.retracted .role-switcher,
    .dashboard-sidebar.retracted .nav-section-title,
    .dashboard-sidebar.retracted .nav-link span,
    .dashboard-sidebar.retracted .nav-badge,
    .dashboard-sidebar.retracted .profile-info {
        display: block;
    }

    .dashboard-nav {
        padding: 0 10px;
    }

    .nav-section-title {
        font-size: 8px;
        margin-bottom: 4px;
    }
    .nav-section {
        margin-bottom: 12px;
    }

    #dashboardSidebar .nav-link {
        justify-content: flex-start;
        width: auto;
        height: auto;
        border-radius: 8px;
        padding: 8px 10px;
        margin: 0 0 4px 0;
        gap: 8px;
        font-size: 11px;
    }

    #dashboardSidebar .nav-link i {
        font-size: 12px;
        text-align: center;
    }

    .user-profile-summary {
        padding: 20px;
        text-align: center;
    }

    .profile-avatar {
        margin-bottom: 4px;
    }

    .profile-avatar img {
        width: 42px;
        height: 42px;
    }

    .profile-email, .seller-rating {
        font-size: 10px;
    }

    /* Dashboard Base Components */
    .dashboard-header, .page-header {
        padding-bottom: 6px;
        margin-bottom: 10px;
    }

    .dashboard-breadcrumb {
        font-size: 10px;
    }

    .dashboard-actions {
        gap: 8px;
    }

    .action-btn.primary {
        padding: 6px 10px;
        gap: 6px;
    }

    .action-btn.secondary {
        padding: 6px;
    }

    .action-btn {
        font-size: 10px;
        border-radius: 8px;
    }

    .filter-form label {
        font-size: 9px !important;
    }

    .filter-form select {
        font-size: 9px;
        padding: 4px 8px;
    }

    .welcome-section {
        padding: 12px 14px;
        border-radius: 12px;
        margin-bottom: 10px;
    }

    .welcome-title, .page-title {
        font-size: 14px;
        margin-bottom: 4px;
    }

    .welcome-subtitle,.page-subtitle {
        font-size: 9px;
    }

    .welcome-actions .btn {
        padding: 6px 8px;
        font-size: 9px;
        border-radius: 8px;
        gap: 6px;
    }

    .dashboard-stats {
        gap: 10px;
        margin-bottom: 10px;
    }

    .stat-card {
        border-radius: 12px;
        padding: 8px 10px;
    }

    .stat-icon {
        width: 30px;
        height: 30px;
        font-size: 14px;
        border-radius: 8px;
    }

    .stat-number {
        font-size: 14px;
    }

    .stat-header {
       gap: 6px;
       margin-bottom: 0;
    }

    .stat-label {
        font-size: 8px;
    }

    .stat-change {
        font-size: 7px;
    }

    .header-date-filter {
        gap: 6px;
    }

    .header-date-filter .filter-label {
        font-size: 9px;
    }

    .date-filter-select {
        padding: 6px 10px;
        font-size: 9px;
        min-width: 80px;
        border-radius: 8px;
    }

    .header-btn, .header-btn-outline {
        padding: 4px 8px;
        font-size: 8px;
        font-weight: 500;
        border-radius: 6px;
        gap: 6px;
    }

    .empty-btn-solid,
    .empty-btn-outline {
        padding: 4px 6px;
        font-size: 9px;
        border-radius: 8px;
        gap: 4px;
    }

    .empty-btn-solid i,
    .empty-btn-outline i {
        font-size: 9px;
    }

    .empty-state {
        padding: 20px;
    }

    .empty-state h3 {
        font-size: 14px;
    }

    .empty-state p {
        font-size: 10px;
    }

    .empty-icon i {
        font-size: 32px;
    }
}