:root {
    --bg-color: #0d0b1f;
    --sidebar-bg: #14112e;
    --card-bg: #1e1b40;
    --text-main: #ffffff;
    --text-muted: #94a3b8;
    --accent: #f5a623;
    --accent-hover: #ffb845;
    --purple-light: #5f4dee;
    --purple-dark: #372a8c;
    --success: #22c55e;
    --danger: #ef4444;
    --border-color: rgba(255, 255, 255, 0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    display: flex;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Authentication Pages */
.auth-page {
    display: flex;
    justify-content: center;
    align-items: center;
    background: radial-gradient(circle at center, var(--sidebar-bg) 0%, var(--bg-color) 100%);
}

.auth-container {
    width: 100%;
    max-width: 400px;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    background: rgba(30, 27, 64, 0.6);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.auth-logo img {
    height: 50px;
    margin-bottom: 20px;
}

.auth-container h2 {
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.form-group {
    margin-bottom: 15px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: rgba(0,0,0,0.2);
    color: white;
    outline: none;
    transition: all 0.3s;
}

.form-group input:focus {
    border-color: var(--purple-light);
}

.btn {
    padding: 12px 20px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-primary {
    background: var(--purple-light);
    color: white;
}
.btn-primary:hover {
    background: var(--purple-dark);
}

.btn-accent {
    background: var(--accent);
    color: #000;
}
.btn-accent:hover {
    background: var(--accent-hover);
}

.w-100 { width: 100%; }

.auth-link {
    margin-top: 20px;
    font-size: 0.9rem;
    color: var(--text-muted);
}
.auth-link a {
    color: var(--accent);
    text-decoration: none;
}
.error { color: var(--danger); margin-bottom: 10px; font-size: 0.9rem; }
.success { color: var(--success); margin-bottom: 10px; font-size: 0.9rem; }

/* Dashboard Layout */
.sidebar {
    width: 260px;
    background-color: var(--sidebar-bg);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 100;
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: 22px 20px;
    display: flex;
    align-items: center;
}

.sidebar-header img {
    height: 52px;
    max-width: 190px;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.3));
}

.sidebar-menu {
    flex: 1;
    overflow-y: auto;
    padding: 10px 0;
}

.menu-item {
    padding: 12px 25px;
    display: flex;
    align-items: center;
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.2s;
    font-size: 0.95rem;
}

.menu-item i {
    margin-right: 12px;
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.menu-item:hover, .menu-item.active {
    color: var(--text-main);
    background: rgba(255,255,255,0.05);
}

.menu-item.active {
    border-left: 3px solid var(--purple-light);
    background: linear-gradient(90deg, rgba(95, 77, 238, 0.1) 0%, transparent 100%);
}

.vip-card {
    margin: 20px;
    padding: 15px;
    background: linear-gradient(135deg, #2b2207 0%, #171305 100%);
    border: 1px solid rgba(245, 166, 35, 0.3);
    border-radius: 12px;
    text-align: center;
}
.vip-card h4 {
    color: var(--accent);
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}
.vip-card p {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.main-content {
    flex: 1;
    margin-left: 260px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: calc(100% - 260px);
}

/* Topbar */
.topbar {
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    border-bottom: 1px solid var(--border-color);
    background: rgba(13, 11, 31, 0.9);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 90;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
}

.welcome-text h3 {
    font-size: 1.1rem;
    font-weight: 600;
}
.welcome-text p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

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

.notification {
    position: relative;
    cursor: pointer;
}
.notification i { font-size: 1.2rem; }
.badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--danger);
    color: white;
    font-size: 0.6rem;
    padding: 2px 5px;
    border-radius: 10px;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    text-decoration: none;
    color: white;
}
.user-profile img {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    object-fit: cover;
}

/* Dashboard Content */
.dashboard-container {
    padding: 30px;
}

/* Banner */
.hero-banner {
    background: linear-gradient(135deg, var(--purple-dark) 0%, #1c154f 100%);
    border-radius: 20px;
    padding: 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
}

.hero-content {
    max-width: 60%;
    z-index: 2;
}

.hero-content h1 {
    font-size: 2.2rem;
    line-weight: 800;
    margin-bottom: 10px;
}

.hero-content p {
    font-size: 1.1rem;
    margin-bottom: 20px;
}

.hero-features {
    display: flex;
    gap: 20px;
}

.feature {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
}
.feature i { color: var(--accent); }

.hero-image {
    position: absolute;
    right: 0;
    bottom: -20px;
    width: 40%;
    text-align: right;
    z-index: 1;
}
.hero-image img {
    max-width: 100%;
    max-height: 250px;
    object-fit: contain;
}

/* Stats Row */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: transform 0.3s;
}
.stat-card:hover { transform: translateY(-5px); }

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: rgba(255,255,255,0.05);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
}

.stat-info p {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 5px;
}
.stat-info h3 {
    font-size: 1.2rem;
    margin-bottom: 5px;
}
.stat-info .stat-link {
    font-size: 0.75rem;
    color: var(--purple-light);
    text-decoration: none;
}

.text-success { color: var(--success) !important; }

/* Products Section */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.section-header h2 { font-size: 1.3rem; }
.section-header a { color: var(--text-muted); text-decoration: none; font-size: 0.9rem; }

.products-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.product-card {
    background: var(--card-bg);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    height: 100%;
}
.product-card:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.3); }

.product-img {
    height: 160px;
    background: #111;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    flex-shrink: 0;
}

.product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.9;
}

.hot-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--danger);
    color: white;
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: bold;
    z-index: 2;
}

.product-info { 
    padding: 16px; 
    display: flex;
    flex-direction: column;
    flex: 1;
}
.product-category { font-size: 0.7rem; color: #f5a623; font-weight: 700; text-transform: uppercase; margin-bottom: 4px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.product-title { font-size: 0.92rem; font-weight: 700; margin-bottom: 12px; height: 42px; line-height: 1.35; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.product-price { margin-top: auto; margin-bottom: 14px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,0.06); min-height: 52px; display: flex; flex-direction: column; justify-content: center; gap: 3px; }
.price-member { color: var(--danger); font-weight: bold; font-size: 0.95rem; }
.price-normal { color: var(--text-muted); text-decoration: line-through; font-size: 0.75rem; }

/* Bottom Sections */
.bottom-sections {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 20px;
}

.info-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 25px;
    border: 1px solid var(--border-color);
}

.info-card h3 { margin-bottom: 20px; text-align: center; }

.steps {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}
.step {
    text-align: center;
    width: 22%;
}
.step-icon {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 10px;
    color: var(--purple-light);
    font-size: 1.2rem;
    position: relative;
}
.step-icon .num {
    position: absolute;
    top: -5px; right: -5px;
    background: var(--accent);
    color: #000;
    width: 18px; height: 18px;
    border-radius: 50%;
    font-size: 0.7rem;
    display: flex; justify-content: center; align-items: center;
    font-weight: bold;
}
.step p { font-size: 0.75rem; color: var(--text-muted); }
.step h5 { font-size: 0.85rem; margin-bottom: 5px; }


/* Responsive Design */
@media (max-width: 1200px) {
    .stats-grid { grid-template-columns: repeat(3, 1fr); }
    .products-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 992px) {
    .hero-banner { flex-direction: column; text-align: center; padding: 30px; }
    .hero-content { max-width: 100%; margin-bottom: 20px; }
    .hero-features { flex-direction: column; align-items: center; gap: 10px;}
    .hero-image { position: relative; width: 100%; text-align: center; bottom: 0; }
    .hero-image img { max-height: 200px; }
    
    .bottom-sections { grid-template-columns: 1fr; }
    .steps { flex-wrap: wrap; gap: 15px; }
    .step { width: 45%; }
}

@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.active { transform: translateX(0); }
    .main-content { margin-left: 0; width: 100%; }
    
    .menu-toggle { display: block; }
    
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .products-grid { grid-template-columns: repeat(2, 1fr); }
    
    .topbar-right { gap: 10px; }
    .welcome-text { display: none; }
}

@media (max-width: 576px) {
    .stats-grid { grid-template-columns: 1fr; }
    .products-grid { grid-template-columns: 1fr; }
    .step { width: 100%; }

    /* Mobile friendly table for Pembelian Saya */
    .data-table {
        display: block;
        overflow: visible;
    }

    .data-table thead {
        display: none;
    }

    .data-table tbody,
    .data-table tr,
    .data-table td {
        display: block;
        width: 100%;
    }

    .data-table tr {
        background: rgba(255,255,255,0.02);
        border: 1px solid var(--border-color);
        border-radius: 12px;
        margin-bottom: 12px;
        overflow: hidden;
    }

    .data-table td {
        padding: 12px 15px;
        border-bottom: 1px solid var(--border-color);
        text-align: left;
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 12px;
    }

    .data-table td:last-child {
        border-bottom: none;
    }

    .data-table td::before {
        content: attr(data-label);
        color: var(--text-muted);
        font-size: 0.8rem;
        font-weight: 500;
        flex: 0 0 45%;
    }

    .data-table td > span,
    .data-table td a {
        flex: 1;
        text-align: right;
    }
}
