/* CellarStores - Complete Styles */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #a5b4fc;
    --secondary: #10b981;
    --secondary-dark: #059669;
    --accent: #f59e0b;
    --danger: #ef4444;
    --dark: #1f2937;
    --dark-light: #374151;
    --gray: #6b7280;
    --gray-light: #9ca3af;
    --light: #f3f4f6;
    --lighter: #f9fafb;
    --white: #ffffff;
    --border: #e5e7eb;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--lighter);
    color: var(--dark);
    line-height: 1.6;
    min-height: 100vh;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

/* ==================== LOADER ==================== */
#globalLoader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loader-content {
    text-align: center;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-state, .error-state, .empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray);
}

.loading-state i, .error-state i, .empty-state i {
    font-size: 48px;
    margin-bottom: 20px;
    color: var(--gray-light);
}

.error-state i { color: var(--danger); }

/* ==================== TOAST ==================== */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    padding: 15px 25px;
    background: var(--dark);
    color: white;
    border-radius: var(--radius);
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: var(--shadow-lg);
    transition: transform 0.3s ease;
    max-width: 90%;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
}

.toast button {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    opacity: 0.7;
}

.toast button:hover { opacity: 1; }
.toast-success { background: var(--secondary); }
.toast-error { background: var(--danger); }
.toast-warning { background: var(--accent); color: var(--dark); }
.toast-info { background: var(--primary); }

/* ==================== BUTTONS ==================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-primary {
    background: var(--primary);
    color: white;
}

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

.btn-secondary {
    background: var(--secondary);
    color: white;
}

.btn-secondary:hover {
    background: var(--secondary-dark);
    color: white;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

.btn-white {
    background: white;
    color: var(--primary);
}

.btn-whatsapp {
    background: #25D366;
    color: white;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 16px;
}

.btn-block {
    width: 100%;
}

/* ==================== FORMS ==================== */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--dark);
    font-size: 14px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 14px;
    transition: var(--transition);
    background: white;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-control::placeholder {
    color: var(--gray-light);
}

.form-select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 14px;
    background: white;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.form-row-4 {
    grid-template-columns: repeat(4, 1fr);
}

.form-section-title {
    margin: 25px 0 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
    font-size: 16px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.checkbox-label input {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.link-copy-group {
    display: flex;
    gap: 10px;
}

.link-copy-group .form-control {
    flex: 1;
}

@media (max-width: 768px) {
    .form-row, .form-row-4 {
        grid-template-columns: 1fr;
    }
}

/* ==================== CARDS ==================== */
.card {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    margin-bottom: 20px;
}

.card-header {
    padding: 20px;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
    font-size: 16px;
}

.card-body {
    padding: 20px;
}

/* ==================== NAVBAR ==================== */
.navbar {
    background: white;
    padding: 15px 20px;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 100%;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 700;
    color: var(--primary);
}

.nav-brand i {
    font-size: 24px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 15px;
}

.nav-link {
    color: var(--gray);
    font-weight: 500;
    padding: 8px 12px;
}

.nav-link:hover {
    color: var(--primary);
}

.nav-user {
    color: var(--dark);
    font-weight: 500;
}

.nav-wallet {
    background: var(--light);
    padding: 8px 15px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    color: var(--primary);
}

@media (max-width: 768px) {
    .nav-links {
        gap: 8px;
    }
    
    .nav-user, .nav-link {
        display: none;
    }
}

/* ==================== HERO ==================== */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 100px 20px;
    text-align: center;
}

.hero h1 {
    font-size: 48px;
    margin-bottom: 20px;
    font-weight: 700;
}

.hero p {
    font-size: 20px;
    opacity: 0.9;
    margin-bottom: 35px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .hero {
        padding: 60px 20px;
    }
    
    .hero h1 {
        font-size: 32px;
    }
    
    .hero p {
        font-size: 16px;
    }
}

/* ==================== CONTAINER ==================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==================== FEATURES ==================== */
.features, .how-it-works, .pricing {
    padding: 80px 20px;
}

.how-it-works {
    background: white;
}

.section-title {
    text-align: center;
    font-size: 36px;
    margin-bottom: 50px;
    font-weight: 700;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-card {
    text-align: center;
    padding: 40px 30px;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(99, 102, 241, 0.2));
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin: 0 auto 20px;
}

.feature-card h3 {
    margin-bottom: 10px;
    font-size: 20px;
}

.feature-card p {
    color: var(--gray);
    font-size: 15px;
}

/* ==================== STEPS ==================== */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    max-width: 900px;
    margin: 0 auto;
}

.step {
    text-align: center;
}

.step-number {
    width: 80px;
    height: 80px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 700;
    margin: 0 auto 20px;
}

.step h3 {
    margin-bottom: 10px;
}

.step p {
    color: var(--gray);
}

@media (max-width: 768px) {
    .steps-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

/* ==================== PRICING ==================== */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    max-width: 1000px;
    margin: 0 auto;
    align-items: start;
}

.pricing-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 40px 30px;
    text-align: center;
    box-shadow: var(--shadow);
    position: relative;
}

.pricing-card.featured {
    border: 3px solid var(--primary);
    transform: scale(1.05);
}

.pricing-card .badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
}

.pricing-card h3 {
    color: var(--primary);
    margin-bottom: 10px;
    font-size: 18px;
}

.price {
    font-size: 48px;
    font-weight: 700;
    margin: 20px 0 5px;
}

.price-period {
    color: var(--gray);
    margin-bottom: 30px;
}

.pricing-features {
    list-style: none;
    text-align: left;
    margin-bottom: 30px;
}

.pricing-features li {
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 10px;
}

.pricing-features li:last-child {
    border-bottom: none;
}

.pricing-features i {
    color: var(--secondary);
}

@media (max-width: 900px) {
    .pricing-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
    }
    
    .pricing-card.featured {
        transform: none;
    }
}

/* ==================== CTA SECTION ==================== */
.cta-section {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-dark) 100%);
    color: white;
    padding: 80px 20px;
    text-align: center;
}

.cta-section h2 {
    font-size: 36px;
    margin-bottom: 15px;
}

.cta-section p {
    font-size: 18px;
    opacity: 0.9;
    margin-bottom: 30px;
}

.referral-rewards {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.referral-rewards span {
    background: rgba(255, 255, 255, 0.2);
    padding: 10px 20px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ==================== FOOTER ==================== */
.footer {
    background: var(--dark);
    color: white;
    padding: 60px 20px 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-col h4 {
    margin-bottom: 20px;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-col p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    line-height: 1.8;
}

.footer-col a {
    color: rgba(255, 255, 255, 0.7);
    display: block;
    margin-bottom: 12px;
    font-size: 14px;
    transition: var(--transition);
}

.footer-col a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    margin-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
}

/* ==================== SOCIAL ICONS ==================== */
.social-icons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.social-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
    transition: var(--transition);
}

.social-icon:hover {
    transform: scale(1.1);
    color: white;
}

.social-icon.facebook { background: #1877f2; }
.social-icon.instagram { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }
.social-icon.tiktok { background: #000; }
.social-icon.twitter { background: #1da1f2; }
.social-icon.whatsapp { background: #25D366; }

/* ==================== AUTH PAGES ==================== */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, var(--primary) 0%, #7c3aed 100%);
}

.auth-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 40px;
    width: 100%;
    max-width: 450px;
    box-shadow: var(--shadow-xl);
}

.auth-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 28px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 30px;
}

.auth-card h2 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 24px;
}

.auth-footer {
    text-align: center;
    margin-top: 25px;
    color: var(--gray);
}

.referral-notice {
    background: rgba(16, 185, 129, 0.1);
    color: var(--secondary);
    padding: 12px 15px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    text-align: center;
    font-size: 14px;
}

.affiliate-notice {
    background: rgba(245, 158, 11, 0.1);
    color: var(--accent);
    padding: 12px 15px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    font-size: 14px;
}

/* ==================== STORE PAGE ==================== */
.store-page {
    background: var(--lighter);
    min-height: 100vh;
}

.store-banner {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.store-header {
    display: flex;
    align-items: flex-start;
    gap: 25px;
    padding: 25px;
    background: white;
    margin: -60px 20px 0;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    position: relative;
    flex-wrap: wrap;
}

.store-logo {
    width: 120px;
    height: 120px;
    border-radius: var(--radius);
    object-fit: cover;
    border: 4px solid white;
    box-shadow: var(--shadow);
    margin-top: -60px;
}

.store-info {
    flex: 1;
    min-width: 200px;
}

.store-info h1 {
    font-size: 28px;
    margin-bottom: 8px;
}

.store-info p {
    color: var(--gray);
    margin-bottom: 15px;
}

.store-social {
    display: flex;
    gap: 10px;
}

.store-content {
    padding: 40px 20px;
}

.store-footer {
    background: var(--dark);
    color: white;
    padding: 50px 20px 30px;
    margin-top: 60px;
}

@media (max-width: 768px) {
    .store-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        margin: -40px 10px 0;
    }
    
    .store-logo {
        margin-top: -80px;
    }
    
    .store-social {
        justify-content: center;
    }
}

/* ==================== CATEGORY TABS ==================== */
.category-tabs {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 15px 0;
    margin-bottom: 25px;
    scrollbar-width: none;
}

.category-tabs::-webkit-scrollbar {
    display: none;
}

.category-tab {
    padding: 10px 24px;
    background: white;
    border: 2px solid var(--border);
    border-radius: 25px;
    cursor: pointer;
    white-space: nowrap;
    font-weight: 500;
    transition: var(--transition);
    font-size: 14px;
}

.category-tab:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.category-tab.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* ==================== PRODUCTS GRID ==================== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
}

.product-card {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: var(--transition);
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.product-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.product-info {
    padding: 20px;
}

.product-name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--dark);
}

.product-price {
    color: var(--primary);
    font-weight: 700;
    font-size: 20px;
}

/* ==================== MODAL ==================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal {
    background: white;
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlide 0.3s ease;
}

@keyframes modalSlide {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 20px;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--gray);
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--light);
    color: var(--dark);
}

.modal-body {
    padding: 25px;
}

.modal-footer {
    padding: 20px 25px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.product-modal-image {
    width: 100%;
    border-radius: var(--radius);
    margin-bottom: 20px;
}

.product-modal-price {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 20px;
}

.variations-section {
    margin-bottom: 20px;
}

.variation-group {
    margin-bottom: 20px;
}

.variation-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.variation-option {
    padding: 10px 18px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    font-size: 14px;
}

.variation-option:hover:not(.out-of-stock) {
    border-color: var(--primary);
}

.variation-option.selected {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
}

.variation-option.out-of-stock {
    opacity: 0.5;
    cursor: not-allowed;
    text-decoration: line-through;
}

.extra-price {
    color: var(--secondary);
    font-size: 12px;
    margin-left: 5px;
}

.product-total {
    font-size: 20px;
    font-weight: 600;
    padding-top: 15px;
    border-top: 1px solid var(--border);
}

/* ==================== WALLET DISPLAY ==================== */
.wallet-display {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 25px;
    border-radius: var(--radius);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.wallet-display-large {
    padding: 30px;
    margin-bottom: 30px;
}

.wallet-label {
    font-size: 14px;
    opacity: 0.8;
    margin-bottom: 5px;
}

.wallet-balance {
    font-size: 32px;
    font-weight: 700;
}

.payment-instructions {
    background: var(--light);
    padding: 25px;
    border-radius: var(--radius);
    margin-top: 20px;
}

.payment-instructions h4 {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.payment-instructions ol {
    padding-left: 20px;
}

.payment-instructions li {
    margin-bottom: 10px;
}

.payment-instructions .warning {
    color: var(--danger);
    margin-top: 15px;
    font-weight: 500;
}

/* ==================== FLOATING WHATSAPP ==================== */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: #25D366;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    z-index: 1000;
    transition: var(--transition);
}

.whatsapp-float:hover {
    transform: scale(1.1);
    color: white;
}

/* ==================== DASHBOARD ==================== */
.dashboard-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background: var(--dark);
    color: white;
    padding: 25px 20px;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-brand {
    font-size: 22px;
    font-weight: 700;
    color: white;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 35px;
}

.sidebar-brand:hover {
    color: white;
}

.sidebar-menu {
    list-style: none;
}

.sidebar-item {
    margin-bottom: 5px;
}

.sidebar-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 20px 0;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    color: rgba(255, 255, 255, 0.7);
    border-radius: var(--radius-sm);
    transition: var(--transition);
    font-size: 14px;
}

.sidebar-link:hover, .sidebar-link.active {
    background: var(--primary);
    color: white;
}

.sidebar-link i {
    width: 20px;
    text-align: center;
}

.main-content {
    flex: 1;
    margin-left: 260px;
    padding: 30px;
    background: var(--lighter);
    min-height: 100vh;
}

.page-title {
    font-size: 28px;
    margin-bottom: 30px;
    font-weight: 600;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.page-header .page-title {
    margin-bottom: 0;
}

@media (max-width: 900px) {
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        padding: 20px;
    }
    
    .main-content {
        margin-left: 0;
        padding: 20px;
    }
    
    .dashboard-layout {
        flex-direction: column;
    }
    
    .sidebar-menu {
        display: flex;
        flex-wrap: wrap;
        gap: 5px;
    }
    
    .sidebar-item {
        margin-bottom: 0;
    }
    
    .sidebar-divider {
        display: none;
    }
}

/* ==================== STATS ==================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stats-grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.stat-card {
    background: white;
    border-radius: var(--radius);
    padding: 25px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 20px;
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.stat-icon.primary {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
}

.stat-icon.success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--secondary);
}

.stat-icon.warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--accent);
}

.stat-info h3 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 5px;
}

.stat-info p {
    color: var(--gray);
    font-size: 14px;
}

@media (max-width: 768px) {
    .stats-grid-2 {
        grid-template-columns: 1fr;
    }
}

/* ==================== TABLE ==================== */
.table-responsive {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th, .table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}

.table th {
    background: var(--light);
    font-weight: 600;
    color: var(--dark);
    white-space: nowrap;
}

.table tr:hover {
    background: var(--lighter);
}

.table-image {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: var(--radius-sm);
}

.text-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.text-muted {
    color: var(--gray);
}

.text-center {
    text-align: center;
}

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

/* ==================== BADGE ==================== */
.badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.badge-primary {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
}

.badge-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--secondary);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--accent);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.badge-secondary {
    background: var(--light);
    color: var(--gray);
}

/* ==================== CATEGORIES GRID ==================== */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.category-card {
    background: white;
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow);
}

.category-card span {
    font-weight: 500;
}

/* ==================== REFERRAL INFO ==================== */
.referral-rewards-info {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 20px;
    padding: 20px;
    background: var(--light);
    border-radius: var(--radius);
}

.referral-rewards-info div {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.referral-rewards-info i {
    color: var(--primary);
}

/* ==================== UTILITIES ==================== */
code {
    background: var(--light);
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 13px;
    color: var(--primary-dark);
}

hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 20px 0;
}

/* ==================== SCROLLBAR ==================== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--light);
}

::-webkit-scrollbar-thumb {
    background: var(--gray-light);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gray);
}
