@import url('https://fonts.googleapis.com/css2?family=Inter:opsz,wght@14..32,300;14..32,400;14..32,500;14..32,600;14..32,700;14..32,800&display=swap');

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;
    --primary-soft: #eff6ff;
    --secondary: #0f172a;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --white: #ffffff;
    
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-2xl: 24px;
    --radius-full: 9999px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--gray-50);
    color: var(--gray-900);
    line-height: 1.5;
}

/* Container */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ============================================
   NAVBAR
   ============================================ */
.navbar {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--gray-200);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    padding: 0.75rem 0;
    box-shadow: var(--shadow-md);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.nav-link {
    color: var(--gray-600);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    transition: all 0.2s;
}

.nav-link:hover {
    color: var(--primary);
    background: var(--primary-soft);
}

/* ============================================
   BUTTONS
   ============================================ */
.btn-login {
    background: var(--primary);
    color: white;
    padding: 0.5rem 1.25rem;
    border-radius: var(--radius-full);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-login:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    color: white;
}

.btn-register {
    background: var(--success);
    color: white;
    padding: 0.5rem 1.25rem;
    border-radius: var(--radius-full);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-register:hover {
    background: #059669;
    transform: translateY(-2px);
    color: white;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: white;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-full);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

.btn-danger {
    background: var(--danger);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-danger:hover {
    background: #dc2626;
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
    background: linear-gradient(135deg, var(--secondary) 0%, #1e1b4b 100%);
    padding: 5rem 0;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('https://images.unsplash.com/photo-1558981806-ec527fa84c39?ixlib=rb-1.2.1&auto=format&fit=crop&w=1950&q=80') center/cover;
    opacity: 0.1;
    z-index: 0;
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
    background: linear-gradient(135deg, #fff, #c7d2fe);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.125rem;
    color: #94a3b8;
    margin-bottom: 2rem;
    max-width: 500px;
}

/* ============================================
   PRODUCT CARD
   ============================================ */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    padding: 2rem 0;
}

.product-card {
    background: var(--white);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: all 0.3s;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary);
}

.product-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    background: var(--gray-100);
}

.product-info {
    padding: 1.25rem;
}

.product-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    margin: 0.5rem 0;
}

.product-stock {
    font-size: 0.75rem;
    color: var(--gray-500);
    margin-bottom: 1rem;
}

/* ============================================
   CART BADGE
   ============================================ */
.cart-badge {
    position: relative;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--danger);
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: var(--radius-full);
    min-width: 18px;
    text-align: center;
}

/* ============================================
   STATUS BADGE
   ============================================ */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 500;
}

.status-pending { background: #fef3c7; color: #d97706; }
.status-processing { background: #dbeafe; color: var(--primary); }
.status-shipped { background: #e0e7ff; color: #4f46e5; }
.status-completed { background: #d1fae5; color: var(--success); }
.status-cancelled { background: #fee2e2; color: var(--danger); }

/* ============================================
   TABLE
   ============================================ */
.table-wrapper {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: auto;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
}

th {
    background: var(--gray-50);
    font-weight: 600;
    color: var(--gray-700);
}

/* ============================================
   FORM
   ============================================ */
.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--gray-700);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    transition: all 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* ============================================
   ALERT
   ============================================ */
.alert {
    padding: 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-danger {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-warning {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde047;
}

/* ============================================
   MODAL
   ============================================ */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    z-index: 1100;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: var(--white);
    border-radius: var(--radius-xl);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow: auto;
}

.modal-header {
    padding: 1.25rem;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-body {
    padding: 1.25rem;
}

.modal-footer {
    padding: 1.25rem;
    border-top: 1px solid var(--gray-200);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

/* ============================================
   TOAST NOTIFICATION
   ============================================ */
.toast-notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: var(--radius-md);
    color: white;
    z-index: 1200;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* ============================================
   STAT CARD
   ============================================ */
.stat-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
    transition: all 0.3s;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    background: var(--secondary);
    color: var(--gray-400);
    padding: 3rem 0 2rem;
    margin-top: 4rem;
}

/* ============================================
   SIDEBAR ADMIN
   ============================================ */
.sidebar {
    width: 260px;
    background: var(--white);
    border-right: 1px solid var(--gray-200);
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    padding: 2rem 0;
    z-index: 100;
}

.sidebar-item {
    display: block;
    padding: 0.75rem 1.5rem;
    color: var(--gray-700);
    text-decoration: none;
    transition: all 0.2s;
}

.sidebar-item:hover,
.sidebar-item.active {
    background: var(--primary-soft);
    color: var(--primary);
}

.main-content {
    margin-left: 260px;
    padding: 2rem;
}

/* ============================================
   PAYMENT CARD
   ============================================ */
.payment-card {
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 1rem;
    cursor: pointer;
    transition: all 0.2s;
}

.payment-card:hover,
.payment-card.selected {
    border-color: var(--primary);
    background: var(--primary-soft);
}

/* ============================================
   SEARCH WRAPPER
   ============================================ */
.search-wrapper {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.search-wrapper input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
}

.search-wrapper input:focus {
    outline: none;
    border-color: var(--primary);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 992px) {
    .sidebar {
        position: relative;
        width: 100%;
        margin-bottom: 1rem;
    }
    .main-content {
        margin-left: 0;
    }
    .hero h1 {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .nav-links {
        width: 100%;
        justify-content: center;
        padding-top: 1rem;
    }
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }
    .hero h1 {
        font-size: 2rem;
    }
    th, td {
        padding: 0.75rem;
    }
    .search-wrapper {
        flex-direction: column;
    }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.text-center { text-align: center; }
.text-primary { color: var(--primary); }
.text-muted { color: var(--gray-500); }
.fw-bold { font-weight: 700; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 1rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 2rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 2rem; }
.w-100 { width: 100%; }