/* ==========================================================================
   EasyToLearning - Modern Member Dashboard Architecture
   ========================================================================== */

/* --- Base Dashboard Structure & Container --- */
.dashboardBox {
    background-color: var(--slate-50);
}

.leftSideSection {
    background: #ffffff !important;
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-md);
    padding: 0 !important;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
}

.leftSideBox .logo {
    padding: 20px 16px;
    text-align: center;
    border-bottom: 1px solid var(--slate-200);
    background: var(--slate-50);
}

.leftSideBox .logo img {
    max-height: 40px;
    width: auto;
}

.leftSideBox .navi ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.leftSideBox .navi ul li {
    border-bottom: 1px solid var(--slate-100);
}

.leftSideBox .navi ul li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--slate-700);
    text-decoration: none;
    transition: var(--transition-fast);
}

.leftSideBox .navi ul li a:hover {
    background-color: var(--slate-50);
    color: var(--primary);
    padding-left: 22px;
}

.leftSideBox .navi ul li.active a {
    background-color: var(--primary-light);
    color: var(--primary);
    font-weight: 600;
    border-left: 3px solid var(--primary);
}

/* Top Menubar */
.member-topbar {
    padding: 12px 20px;
    background: #ffffff;
    border-bottom: 1px solid var(--slate-200);
    margin-bottom: 20px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.member-topbar-left {
    display: flex;
    align-items: center;
}

.member-topbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.member-user-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--slate-100);
    padding: 5px 12px;
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 600;
    color: var(--slate-800);
}

/* Main Dashboard Canvas */
.user-dashboard {
    background: #ffffff;
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.user-dashboard h1 {
    font-size: 1.6rem;
    color: var(--slate-900);
    margin-bottom: 16px;
}

/* Legacy Metric Action Boxes (Maintained for backward compatibility) */
.dashboardIconBoxSection .cardbox {
    background: var(--slate-50);
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-md);
    padding: 20px;
    text-align: center;
    transition: var(--transition-base);
    margin-bottom: 16px;
}

.dashboardIconBoxSection .cardbox:hover {
    background: #ffffff;
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.dashboardIconBoxSection .cardbox a {
    text-decoration: none;
    display: block;
}

.dashboardIconBoxSection .cardbox .text-xs {
    font-size: 15px;
    font-weight: 600;
    color: var(--slate-800);
}

/* Modern Dashboard Hero Card */
.dashboard-hero-banner {
    background: linear-gradient(135deg, #ffffff 0%, var(--primary-light) 100%);
    border: 1px solid var(--primary-border);
    border-radius: var(--radius-lg);
    padding: 22px 24px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    box-shadow: var(--shadow-xs);
}

.dashboard-hero-profile {
    display: flex;
    align-items: center;
    gap: 16px;
}

.dashboard-hero-avatar {
    width: 54px;
    height: 54px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(var(--primary-rgb), 0.25);
    flex-shrink: 0;
}

.dashboard-hero-content h1 {
    font-size: 22px;
    font-weight: 700;
    color: var(--slate-900);
    margin: 0 0 4px 0;
    line-height: 1.3;
}

.dashboard-hero-content p {
    color: var(--slate-600);
    font-size: 13.5px;
    margin: 0;
}

.dashboard-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 8px;
    background-color: var(--secondary-light);
    color: var(--secondary-text);
    border: 1px solid var(--secondary-border);
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 600;
    margin-left: 6px;
}

.dashboard-hero-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* Modern Metric KPI Widgets */
.dashboard-stat-card {
    background: #ffffff;
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-md);
    padding: 16px 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none !important;
    color: inherit !important;
    transition: var(--transition-base);
    box-shadow: var(--shadow-xs);
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.dashboard-stat-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: transparent;
    transition: var(--transition-fast);
}

.dashboard-stat-card:hover {
    transform: translateY(-2px);
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

.dashboard-stat-card:hover::after {
    background: var(--primary);
}

.dashboard-stat-icon {
    width: 46px;
    height: 46px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.dashboard-stat-icon.primary {
    background-color: var(--primary-light);
    color: var(--primary);
}

.dashboard-stat-icon.success {
    background-color: var(--secondary-light);
    color: var(--secondary);
}

.dashboard-stat-icon.info {
    background-color: var(--info-light);
    color: var(--info);
}

.dashboard-stat-icon.accent {
    background-color: var(--accent-light);
    color: var(--accent);
}

.dashboard-stat-content {
    flex: 1;
    min-width: 0;
}

.dashboard-stat-number {
    font-size: 22px;
    font-weight: 700;
    color: var(--slate-900);
    line-height: 1.2;
}

.dashboard-stat-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--slate-600);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dashboard-stat-arrow {
    color: var(--slate-400);
    font-size: 13px;
    transition: var(--transition-fast);
}

.dashboard-stat-card:hover .dashboard-stat-arrow {
    color: var(--primary);
    transform: translateX(3px);
}

/* Dashboard Section Heading */
.dashboard-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 6px;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--slate-200);
}

.dashboard-section-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--slate-800);
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

/* Dashboard Modern Card Panels */
.dashboard-card {
    background: #ffffff;
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xs);
    margin-bottom: 24px;
    overflow: hidden;
    transition: var(--transition-base);
}

.dashboard-card-header {
    padding: 13px 18px;
    background: var(--slate-50);
    border-bottom: 1px solid var(--slate-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dashboard-card-header h3 {
    font-size: 14px;
    font-weight: 700;
    color: var(--slate-800);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dashboard-card-header a {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.dashboard-card-header a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

.dashboard-table {
    margin-bottom: 0;
    border: none;
    border-radius: 0;
    box-shadow: none;
}

.dashboard-table th {
    background: var(--slate-100);
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--slate-600);
    padding: 10px 16px;
    border-top: none;
    border-bottom: 1px solid var(--slate-200);
}

.dashboard-table td {
    padding: 12px 16px;
    vertical-align: middle;
    border-top: 1px solid var(--slate-100);
    font-size: 13.5px;
}

.dashboard-table tbody tr:hover {
    background-color: var(--slate-50);
}

/* Empty State Widget */
.dashboard-empty-state {
    padding: 32px 20px;
    text-align: center;
}

.dashboard-empty-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-full);
    background: var(--slate-100);
    color: var(--slate-400);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin-bottom: 10px;
}

.dashboard-empty-title {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--slate-700);
    margin-bottom: 4px;
}

.dashboard-empty-desc {
    font-size: 12.5px;
    color: var(--slate-500);
    margin-bottom: 12px;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
}

/* Status Badges */
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.status-pill-success {
    background-color: var(--secondary-light);
    color: var(--secondary-text);
    border: 1px solid var(--secondary-border);
}

.status-pill-warning {
    background-color: var(--accent-light);
    color: var(--accent-text);
    border: 1px solid var(--accent-border);
}

.status-pill-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
}

.status-pill-success .status-pill-dot {
    background-color: var(--secondary);
}

.status-pill-warning .status-pill-dot {
    background-color: var(--accent);
}

/* ==========================================================================
   Member Dashboard Mobile & Responsive Breakpoints
   ========================================================================== */
@media (max-width: 991px) {
    .leftSideSection {
        margin-bottom: 20px;
    }
}

@media (max-width: 767.98px) {
    .dashboardBox {
        padding-left: 10px;
        padding-right: 10px;
    }

    .leftSideSection {
        margin-bottom: 16px;
        border-radius: var(--radius-md);
    }

    .leftSideSection .logo {
        display: none;
    }

    .leftSideBox .navi ul {
        display: flex;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
        padding: 6px;
        gap: 6px;
        background: #ffffff;
    }

    .leftSideBox .navi ul li {
        border-bottom: none;
        flex: 0 0 auto;
    }

    .leftSideBox .navi ul li a {
        padding: 8px 12px;
        font-size: 12.5px;
        border-radius: var(--radius-sm);
        border-left: none !important;
        background-color: var(--slate-100);
    }

    .leftSideBox .navi ul li.active a {
        background-color: var(--primary);
        color: #ffffff !important;
    }

    .leftSideBox .navi ul li a:hover {
        padding-left: 12px;
    }

    .member-topbar {
        padding: 12px 14px !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px !important;
    }

    .member-topbar-left {
        justify-content: flex-start;
    }

    .member-topbar-right {
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 8px;
    }

    .member-topbar-right .member-user-pill {
        width: 100%;
        justify-content: center;
        margin-bottom: 4px;
    }

    .member-topbar-right .btn {
        flex: 1;
        text-align: center;
        justify-content: center;
    }

    .user-dashboard {
        padding: 16px 14px;
    }

    .dashboard-hero-banner {
        padding: 16px 14px;
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
    }

    .dashboard-hero-profile {
        align-items: flex-start;
        gap: 12px;
    }

    .dashboard-hero-content h1 {
        font-size: 18px;
    }

    .dashboard-hero-actions {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .dashboard-hero-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .dashboard-stat-card {
        padding: 14px;
        margin-bottom: 12px;
    }

    .dashboard-stat-number {
        font-size: 20px;
    }

    .dashboard-stat-label {
        font-size: 12.5px;
        white-space: normal;
    }

    .dashboard-table th,
    .dashboard-table td {
        padding: 10px 12px;
        font-size: 12.5px;
    }
}