/* assets/css/dashboard.css - VILOS Dashboard & Member Portal Styling */

body.dashboard-body {
    background-color: #f4f6fb;
    color: #1e293b;
    font-family: 'Plus Jakarta Sans', sans-serif;
    display: flex;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Dashboard Layout */
.app-sidebar {
    width: 260px;
    background: #ffffff;
    border-right: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
}

.sidebar-header {
    padding: 1.5rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-bottom: 1px solid #f1f5f9;
}

.sidebar-header img {
    height: 40px;
    width: auto;
}

.sidebar-brand {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: 0.5px;
}

.sidebar-menu {
    padding: 1.25rem 1rem;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    flex-grow: 1;
}

.sidebar-menu li a {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.75rem 1rem;
    color: #64748b;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 12px;
    transition: all 0.2s ease;
}

.sidebar-menu li a:hover {
    background-color: #f1f5f9;
    color: #0f172a;
}

.sidebar-menu li a.active {
    background: linear-gradient(135deg, #6c2bd9, #7c3aed);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(108, 43, 217, 0.3);
}

.sidebar-menu li a i {
    font-size: 1.15rem;
    width: 24px;
    text-align: center;
}

.app-main {
    margin-left: 260px;
    width: calc(100% - 260px);
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 0;
    box-sizing: border-box;
}

/* Top Header Bar */
.top-header {
    height: 72px;
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    padding: 0 2.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 90;
    width: 100%;
    align-self: stretch;
    box-sizing: border-box;
}

.search-box {
    position: relative;
    width: 320px;
}

.search-box input {
    width: 100%;
    padding: 0.6rem 1rem 0.6rem 2.5rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 9999px;
    font-size: 0.9rem;
    color: #0f172a;
    outline: none;
    transition: all 0.2s ease;
}

.search-box input:focus {
    background: #ffffff;
    border-color: #6c2bd9;
    box-shadow: 0 0 0 3px rgba(108, 43, 217, 0.1);
}

.search-box i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.header-icon-btn {
    position: relative;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s ease;
}

.header-icon-btn:hover {
    background: #f1f5f9;
    color: #6c2bd9;
}

.header-icon-btn .badge-count {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ef4444;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-profile-widget {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e2e8f0;
}

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

.user-name {
    font-weight: 700;
    font-size: 0.95rem;
    color: #0f172a;
    line-height: 1.2;
}

.user-tier-badge {
    font-size: 0.75rem;
    font-weight: 700;
    color: #d97706;
}

/* Dashboard Content Area */
.dashboard-content {
    padding: 2rem 2.5rem;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
}

/* Inner centered content wrapper */
.content-wrapper {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
}

.page-title-row {
    margin-bottom: 1.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.page-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.75rem;
    font-weight: 800;
    color: #0f172a;
}

/* Stat Cards Grid */
.stat-cards-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
}

.stat-card.vip-card {
    background: linear-gradient(135deg, #1e1136, #2d1854);
    color: #ffffff;
    border: none;
    position: relative;
    overflow: hidden;
}

.stat-card.vip-card::after {
    content: '';
    position: absolute;
    right: -20px;
    bottom: -20px;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.3) 0%, rgba(0,0,0,0) 70%);
}

.stat-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.stat-card-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #64748b;
}

.vip-card .stat-card-title {
    color: #cbd5e1;
}

.stat-icon {
    font-size: 1.25rem;
    color: #6c2bd9;
}

.vip-card .stat-icon {
    color: #fbbf24;
}

.stat-value {
    font-family: 'Outfit', sans-serif;
    font-size: 1.75rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 0.25rem;
}

.vip-card .stat-value {
    color: #ffffff;
}

.stat-sub {
    font-size: 0.8rem;
    color: #94a3b8;
}

.vip-card .stat-sub {
    color: #fbbf24;
}

/* Profit Comparison Card */
.profit-box-card {
    background: #ffffff;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
    padding: 1.75rem 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
}

.profit-box-header {
    font-size: 1.15rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 1.25rem;
}

.profit-box-content {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 2rem;
    align-items: center;
}

.profit-product-img {
    width: 140px;
    height: 140px;
    object-fit: cover;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
}

.profit-details-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    background: #f8fafc;
    padding: 1.25rem 1.5rem;
    border-radius: 16px;
    align-items: center;
    text-align: center;
}

.profit-col-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 0.35rem;
}

.profit-col-val {
    font-family: 'Outfit', sans-serif;
    font-size: 1.35rem;
    font-weight: 800;
    color: #0f172a;
}

.profit-col-val.highlight-green {
    color: #10b981;
}

/* Dashboard 2-column Grid */
.dashboard-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.dashboard-card {
    background: #ffffff;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
    padding: 1.75rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
}

.dashboard-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 1.25rem;
}

/* Activity List */
.activity-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid #f1f5f9;
}

.activity-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.activity-avatar-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #fef3c7;
    color: #d97706;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.activity-details {
    flex-grow: 1;
}

.activity-text {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1e293b;
}

.activity-time {
    font-size: 0.78rem;
    color: #94a3b8;
}

/* Quick Links List */
.quick-links-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.quick-link-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.9rem 1.25rem;
    background: #f8fafc;
    border-radius: 12px;
    color: #1e293b;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    border: 1px solid #e2e8f0;
}

.quick-link-item:hover {
    background: #ffffff;
    border-color: #6c2bd9;
    color: #6c2bd9;
    transform: translateX(4px);
}

.quick-link-item i.left-icon {
    font-size: 1.1rem;
    margin-right: 0.75rem;
    color: #6c2bd9;
}

.quick-link-item i.arrow-icon {
    color: #94a3b8;
    font-size: 0.9rem;
}

@media (max-width: 1024px) {
    .stat-cards-grid {
        grid-template-columns: 1fr 1fr;
    }
    .profit-details-grid {
        grid-template-columns: 1fr 1fr;
    }
    .dashboard-grid-2 {
        grid-template-columns: 1fr;
    }
    .dashboard-content {
        padding: 1.75rem 2rem;
    }
}

@media (max-width: 768px) {
    .app-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    .app-sidebar.open {
        transform: translateX(0);
    }
    .app-main {
        margin-left: 0;
        width: 100%;
    }
    .stat-cards-grid {
        grid-template-columns: 1fr;
    }
    .profit-box-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .profit-product-img {
        margin: 0 auto;
    }
    .dashboard-content {
        padding: 1.25rem 1rem;
    }
    .page-title {
        font-size: 1.35rem;
    }
    .page-title-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
}

@media (max-width: 480px) {
    .dashboard-content {
        padding: 1rem 0.75rem;
    }
    .stat-cards-grid {
        grid-template-columns: 1fr;
    }
}

/* Enhanced Table & Form Controls Styling for Member Pages */
.orders-table, .dashboard-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
}

.orders-table th, .dashboard-table th {
    background: #f8fafc;
    font-size: 0.85rem;
    font-weight: 700;
    color: #64748b;
    padding: 1.1rem 1.35rem;
    border-bottom: 1px solid #e2e8f0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.orders-table td, .dashboard-table td {
    padding: 1.1rem 1.35rem;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.92rem;
    color: #334155;
    vertical-align: middle;
}

.orders-table tr:last-child td, .dashboard-table tr:last-child td {
    border-bottom: none;
}

.orders-table tr:hover, .dashboard-table tr:hover {
    background-color: #faf5ff;
}

.form-control-enhanced {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    font-size: 0.92rem;
    outline: none;
    transition: all 0.2s ease;
    color: #0f172a;
}

.form-control-enhanced:focus {
    border-color: #6c2bd9;
    box-shadow: 0 0 0 3px rgba(108, 43, 217, 0.15);
}
