/* ============================================
   CleverShop — Light & Green Theme
   ============================================ */

:root {
    --bg-white: #ffffff;
    --bg-light: #f8fafc;
    --bg-subtle: #f1f5f9;
    --bg-card: #ffffff;
    --bg-card-hover: #f8fafc;
    --bg-elevated: #f1f5f9;
    --bg-glass: rgba(255, 255, 255, 0.85);

    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;

    --green-50: #f0fdf4;
    --green-100: #dcfce7;
    --green-200: #bbf7d0;
    --green-300: #86efac;
    --green-400: #4ade80;
    --green-500: #22c55e;
    --green-600: #16a34a;
    --green-700: #15803d;
    --green-800: #166534;

    --accent: #22c55e;
    --accent-hover: #16a34a;
    --accent-light: #f0fdf4;
    --accent-gradient: linear-gradient(135deg, #22c55e, #16a34a);
    --accent-glow: rgba(34, 197, 94, 0.2);

    --coral: #ef4444;
    --coral-dim: rgba(239, 68, 68, 0.08);
    --gold: #f59e0b;
    --gold-dim: rgba(245, 158, 11, 0.08);

    --success: #22c55e;
    --danger: #ef4444;
    --warning: #f59e0b;

    --border: #e2e8f0;
    --border-light: #cbd5e1;
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
    --radius-xl: 20px;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07), 0 2px 4px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.08), 0 4px 10px rgba(0, 0, 0, 0.04);
    --shadow-glow: 0 0 20px rgba(34, 197, 94, 0.15);

    --sidebar-width: 240px;
    --topbar-height: 64px;
    --transition: 0.2s ease;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    background: var(--bg-light);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-subtle); }
::-webkit-scrollbar-thumb { background: var(--text-muted); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-secondary); }

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

/* ============================================
   Layout
   ============================================ */

.layout { display: flex; min-height: 100vh; }
.main-content { flex: 1; margin-left: var(--sidebar-width); display: flex; flex-direction: column; min-height: 100vh; }
.container { flex: 1; padding: 1.75rem; max-width: 1280px; width: 100%; margin: 0 auto; }

/* ============================================
   Sidebar
   ============================================ */

.sidebar {
    position: fixed; left: 0; top: 0; bottom: 0;
    width: var(--sidebar-width);
    background: var(--bg-white);
    border-right: 1px solid var(--border);
    display: flex; flex-direction: column;
    z-index: 1000;
    transition: transform 0.3s ease;
}

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

.logo {
    display: flex; align-items: center; gap: 0.65rem;
    font-size: 1.2rem; font-weight: 800;
    color: var(--accent);
    letter-spacing: -0.02em;
}

.logo i { font-size: 1.4rem; color: var(--accent); }

.sidebar-toggle {
    display: none; background: none; border: none;
    color: var(--text-muted); font-size: 1.2rem;
    cursor: pointer; padding: 0.25rem;
}

.sidebar-nav { flex: 1; overflow-y: auto; padding: 0.5rem 0; }

.nav-item {
    display: flex; align-items: center; gap: 0.75rem;
    padding: 0.6rem 1rem;
    color: var(--text-secondary);
    transition: all var(--transition);
    border-left: 3px solid transparent;
    font-size: 0.875rem;
    font-weight: 500;
}
.nav-item i { width: 20px; text-align: center; font-size: 0.95rem; }
.nav-item:hover { background: var(--accent-light); color: var(--accent); }

.nav-item.active {
    background: var(--accent-light);
    color: var(--accent);
    border-left-color: var(--accent);
    font-weight: 600;
}

.nav-divider {
    padding: 0.75rem 1rem 0.35rem;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    font-weight: 700;
}

.sidebar-footer { padding: 1rem; border-top: 1px solid var(--border); }
.sidebar-contacts { display: flex; gap: 0.75rem; justify-content: center; }
.sidebar-contacts a { color: var(--text-muted); font-size: 1.1rem; transition: color var(--transition); }
.sidebar-contacts a:hover { color: var(--accent); }

/* ============================================
   Topbar
   ============================================ */

.topbar {
    height: var(--topbar-height);
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center;
    padding: 0 1.75rem; gap: 1rem;
    position: sticky; top: 0; z-index: 100;
}

.search-bar { flex: 1; max-width: 400px; display: flex; position: relative; }

.search-bar input {
    width: 100%;
    padding: 0.55rem 1rem;
    padding-right: 2.5rem;
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 0.85rem;
    transition: all var(--transition);
    font-family: inherit;
}
.search-bar input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.search-bar input::placeholder { color: var(--text-muted); }

.search-bar button {
    position: absolute; right: 0.65rem; top: 50%;
    transform: translateY(-50%);
    background: none; border: none;
    color: var(--text-muted); cursor: pointer;
}

.topbar-actions { display: flex; align-items: center; gap: 0.75rem; margin-left: auto; }

.topbar-btn {
    display: flex; align-items: center; gap: 0.5rem;
    color: var(--text-secondary);
    transition: color var(--transition);
    background: none; border: none; cursor: pointer; font-size: 0.9rem;
}
.topbar-btn:hover { color: var(--text-primary); }
.cart-btn { position: relative; font-size: 1.2rem; }

.cart-badge {
    position: absolute; top: -6px; right: -8px;
    background: var(--accent-gradient);
    color: white;
    font-size: 0.6rem; font-weight: 800;
    min-width: 18px; height: 18px;
    border-radius: 9px;
    display: flex; align-items: center; justify-content: center;
    padding: 0 4px;
    box-shadow: 0 0 10px var(--accent-glow);
}

.user-name { font-size: 0.85rem; font-weight: 500; }
.user-btn i { font-size: 1.3rem; }

/* ============================================
   Buttons
   ============================================ */

.btn {
    display: inline-flex; align-items: center; justify-content: center;
    gap: 0.45rem;
    padding: 0.55rem 1.25rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem; font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    border: none; text-decoration: none;
    line-height: 1.4;
    font-family: inherit;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0px); }

.btn-primary {
    background: var(--accent-gradient);
    color: white;
    box-shadow: 0 4px 14px var(--accent-glow);
}
.btn-primary:hover { box-shadow: 0 6px 20px var(--accent-glow); color: white; }

.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-light); }

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

.btn-disabled { background: var(--bg-subtle); color: var(--text-muted); cursor: not-allowed; }
.btn-disabled:hover { transform: none; }

.btn-sm { padding: 0.35rem 0.75rem; font-size: 0.78rem; }
.btn-lg { padding: 0.75rem 1.75rem; font-size: 0.95rem; }
.btn-block { width: 100%; }

/* ============================================
   Forms
   ============================================ */

.form-group { margin-bottom: 1rem; }

.form-group label {
    display: block; margin-bottom: 0.35rem;
    color: var(--text-secondary);
    font-size: 0.8rem; font-weight: 600;
}

.form-control {
    width: 100%;
    padding: 0.6rem 0.85rem;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.88rem;
    transition: all var(--transition);
    font-family: inherit;
}
.form-control:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.form-control::placeholder { color: var(--text-muted); }

select.form-control {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%2394a3b8' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat; background-position: right 0.75rem center;
    background-size: 12px; padding-right: 2.5rem;
}

textarea.form-control { resize: vertical; min-height: 100px; }
.form-checkboxes { display: flex; gap: 1.5rem; margin-bottom: 1rem; }

.checkbox-label {
    display: flex; align-items: center; gap: 0.5rem;
    cursor: pointer; color: var(--text-secondary); font-size: 0.88rem;
}
.checkbox-label input[type="checkbox"] { accent-color: var(--accent); width: 16px; height: 16px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

/* ============================================
   Alerts
   ============================================ */

.alert {
    padding: 0.85rem 1.25rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
    font-size: 0.88rem;
    display: flex; align-items: center; gap: 0.5rem;
    animation: slideDown 0.3s ease;
}

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

.alert-success { background: var(--accent-light); border: 1px solid var(--green-200); color: var(--green-700); }
.alert-danger { background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c; }
.alert-warning { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }

/* ============================================
   Hero
   ============================================ */

.hero {
    text-align: center;
    padding: 4.5rem 2rem 3.5rem;
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-xl);
    background: var(--bg-white);
    border: 1px solid var(--border);
    margin-bottom: 1.5rem;
}

.hero-bg-grid {
    position: absolute; inset: 0;
    background-image:
        linear-gradient(var(--border) 1px, transparent 1px),
        linear-gradient(90deg, var(--border) 1px, transparent 1px);
    background-size: 60px 60px;
    opacity: 0.4;
    pointer-events: none;
}

.hero-content { position: relative; z-index: 1; max-width: 720px; margin: 0 auto; }

.hero-badge {
    display: inline-flex;
    padding: 0.35rem 1rem;
    border-radius: 99px;
    background: var(--accent-light);
    color: var(--green-700);
    font-size: 0.78rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    line-height: 1.1;
    letter-spacing: -0.03em;
    color: var(--text-primary);
}

.gradient-text {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 1.05rem;
    color: var(--text-secondary);
    margin-bottom: 1.75rem;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

/* Hero search */
.hero-search {
    display: flex;
    align-items: center;
    max-width: 500px;
    margin: 0 auto 1.75rem;
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.35rem 0.35rem 0.35rem 1rem;
    transition: all var(--transition);
}
.hero-search:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
    background: var(--bg-white);
}
.hero-search i { color: var(--text-muted); font-size: 0.9rem; }
.hero-search input {
    flex: 1;
    border: none;
    background: none;
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    color: var(--text-primary);
    font-family: inherit;
    outline: none;
}
.hero-search input::placeholder { color: var(--text-muted); }
.hero-search .btn { border-radius: var(--radius-sm); padding: 0.5rem 1.25rem; font-size: 0.85rem; }

/* Hero category pills */
.hero-categories {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-cat-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.85rem;
    border-radius: 99px;
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 500;
    transition: all var(--transition);
}
.hero-cat-pill i { font-size: 0.75rem; color: var(--accent); }
.hero-cat-pill:hover {
    border-color: var(--accent);
    background: var(--accent-light);
    color: var(--accent);
}

/* ============================================
   Stats Bar
   ============================================ */

.stats-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem 1rem;
    margin-bottom: 2.5rem;
}

.stat-item {
    flex: 1;
    text-align: center;
    padding: 0 1rem;
}

.stat-number {
    display: block;
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
}

.stat-desc {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 0.2rem;
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: var(--border);
}

/* Sales count badge */
.product-badge.sales-count {
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(4px);
    color: var(--accent);
    top: auto;
    bottom: 0.5rem;
    left: 0.5rem;
    font-size: 0.7rem;
    font-weight: 700;
    border: 1px solid var(--border);
}

/* Small wishlist on cards */
.wishlist-btn-sm {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-white);
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
}
.wishlist-btn-sm:hover { border-color: var(--danger); color: var(--danger); }
.wishlist-btn-sm.active { background: #fef2f2; border-color: #fecaca; color: var(--danger); }

/* ============================================
   CTA Section
   ============================================ */

.cta-section {
    text-align: center;
    padding: 3.5rem 2rem;
    border-radius: var(--radius-xl);
    background: var(--bg-card);
    border: 1px solid var(--border);
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute; inset: 0;
    background: var(--accent-gradient);
    opacity: 0.04;
}

.cta-content { position: relative; z-index: 1; }

.cta-content h2 {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
}

.cta-content p {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 1.5rem;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

.cta-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
}

/* ============================================
   Section
   ============================================ */

.section { margin-bottom: 2.5rem; }

.section-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 1.25rem; flex-wrap: wrap; gap: 0.75rem;
}

.section-header h2 {
    font-size: 1.35rem;
    font-weight: 700;
    display: flex; align-items: center; gap: 0.5rem;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}
.section-header h2 i { color: var(--accent); }

/* ============================================
   Product Cards
   ============================================ */

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.25rem;
}

.product-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: all var(--transition);
}
.product-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    box-shadow: var(--shadow-lg), 0 0 20px var(--accent-glow);
}

.product-card-image {
    position: relative;
    height: 180px;
    overflow: hidden;
    background: var(--bg-subtle);
}
.product-card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.product-card:hover .product-card-image img { transform: scale(1.05); }

.product-card-placeholder {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    font-size: 3rem; color: var(--text-muted);
}

.product-badge {
    position: absolute;
    padding: 0.25rem 0.6rem;
    border-radius: var(--radius-sm);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.product-badge.discount { background: var(--danger); color: white; top: 0.5rem; left: 0.5rem; }
.product-badge.category { background: var(--bg-glass); backdrop-filter: blur(8px); color: var(--text-primary); top: 0.5rem; right: 0.5rem; border: 1px solid var(--border); }

.product-badge.discount-large {
    position: absolute; top: 1rem; left: 1rem;
    background: var(--danger); color: white;
    padding: 0.35rem 0.85rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem; font-weight: 700;
}

.product-card-body { padding: 1rem; }

.product-card-body h3 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.product-card-body p {
    color: var(--text-muted);
    font-size: 0.78rem;
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
}

.product-category {
    font-size: 0.7rem;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 0.25rem;
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.product-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 0.5rem;
}

.product-price { display: flex; flex-direction: column; }

.current-price {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text-primary);
}
.current-price.large { font-size: 1.8rem; }

.old-price {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-decoration: line-through;
}

.product-card-actions { display: flex; gap: 0.35rem; }
.out-of-stock { font-size: 0.7rem; color: var(--danger); font-weight: 600; }

/* ============================================
   Categories Grid
   ============================================ */

.categories-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.category-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem 1rem;
    text-align: center;
    transition: all var(--transition);
    color: var(--text-primary);
}

.category-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    box-shadow: var(--shadow-md), 0 0 20px var(--accent-glow);
    color: var(--text-primary);
}

.category-card:last-child:nth-child(5) {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    text-align: left;
    gap: 1.25rem;
    padding: 1.25rem 1.5rem;
}
.category-card:last-child:nth-child(5) .category-icon { margin: 0; }
.category-card:last-child:nth-child(5) h3 { margin: 0; font-size: 1.1rem; }
.category-card:last-child:nth-child(5) p { margin: 0; display: inline; }
.category-card:last-child:nth-child(5) .category-count { justify-self: end; }

.category-icon {
    width: 52px; height: 52px;
    border-radius: 50%;
    background: var(--accent-light);
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 0.75rem;
    font-size: 1.3rem;
    color: var(--accent);
    transition: all var(--transition);
}
.category-card:hover .category-icon { background: var(--accent-gradient); color: white; }

.category-card h3 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
}
.category-card p { font-size: 0.78rem; color: var(--text-muted); margin-bottom: 0.5rem; }
.category-count { font-size: 0.72rem; color: var(--accent); font-weight: 600; }

/* ============================================
   Features Section
   ============================================ */

.features-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }

.feature-card {
    text-align: center;
    padding: 2rem 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all var(--transition);
}
.feature-card:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: var(--shadow-md); }

.feature-icon {
    width: 56px; height: 56px;
    border-radius: 50%;
    background: var(--accent-gradient);
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.3rem;
    color: white;
}

.feature-card h3 { font-size: 0.95rem; font-weight: 700; margin-bottom: 0.5rem; }
.feature-card p { font-size: 0.82rem; color: var(--text-muted); line-height: 1.5; }

/* ============================================
   Product Detail Page
   ============================================ */

.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    overflow: hidden;
}

.product-detail-image {
    position: relative;
    min-height: 400px;
    background: var(--bg-subtle);
    display: flex; align-items: center; justify-content: center;
}
.product-detail-image img { width: 100%; height: 100%; object-fit: cover; }
.product-detail-placeholder { font-size: 5rem; color: var(--text-muted); }

.product-detail-info { padding: 2.5rem; }

.breadcrumb {
    display: flex; align-items: center; gap: 0.5rem;
    font-size: 0.78rem; margin-bottom: 1.5rem; flex-wrap: wrap;
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb i { font-size: 0.55rem; color: var(--text-muted); }
.breadcrumb span { color: var(--text-secondary); }

.product-detail-info h1 {
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
}

.product-meta { display: flex; gap: 1.5rem; margin-bottom: 1.25rem; font-size: 0.82rem; }
.in-stock { color: var(--success); }
.product-stock-count { color: var(--text-muted); }

.product-detail-price { margin-bottom: 1.5rem; }

.product-description { margin-bottom: 1.5rem; }
.product-description h3 { font-size: 0.95rem; font-weight: 700; margin-bottom: 0.5rem; }
.product-description p { color: var(--text-secondary); font-size: 0.88rem; line-height: 1.7; }

.product-detail-actions { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem; }

.quantity-selector {
    display: flex; align-items: center;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}
.quantity-selector.small { width: fit-content; }

.qty-btn {
    width: 36px; height: 36px;
    background: none; border: none;
    color: var(--text-secondary);
    font-size: 1.1rem; cursor: pointer;
    transition: background var(--transition);
}
.qty-btn:hover { background: var(--bg-subtle); }

.quantity-selector input {
    width: 50px; height: 36px;
    text-align: center;
    background: none; border: none;
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
    color: var(--text-primary);
    font-size: 0.88rem;
}
.quantity-selector input::-webkit-inner-spin-button,
.quantity-selector input::-webkit-outer-spin-button { -webkit-appearance: none; }

.product-features { display: flex; gap: 1.5rem; }
.pf-item { display: flex; align-items: center; gap: 0.35rem; font-size: 0.78rem; color: var(--text-muted); }
.pf-item i { color: var(--success); }

/* ============================================
   Cart
   ============================================ */

.cart-layout { display: grid; grid-template-columns: 1fr 320px; gap: 1.5rem; }
.cart-items { display: flex; flex-direction: column; gap: 0.75rem; }

.cart-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 1rem 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    gap: 1rem;
}

.cart-item-info { display: flex; align-items: center; gap: 0.85rem; }

.cart-item-icon {
    width: 44px; height: 44px;
    border-radius: var(--radius-sm);
    background: var(--accent-light);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem; color: var(--accent);
}
.cart-item-info h4 { font-size: 0.9rem; font-weight: 700; }
.cart-item-price { font-size: 0.78rem; color: var(--text-muted); }

.cart-item-controls { display: flex; align-items: center; gap: 1rem; }
.cart-item-subtotal { font-weight: 700; font-size: 0.9rem; min-width: 90px; text-align: right; }
.cart-qty-form { display: inline; }

.cart-summary {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    height: fit-content;
    position: sticky;
    top: calc(var(--topbar-height) + 1rem);
}

.cart-summary h3 {
    font-size: 1.05rem; font-weight: 700;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.cart-summary-row {
    display: flex; justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.85rem; color: var(--text-secondary);
}

.cart-summary-row.total {
    font-size: 1.15rem; font-weight: 700;
    color: var(--text-primary);
    padding-top: 0.75rem; margin-top: 0.75rem;
    border-top: 1px solid var(--border);
    margin-bottom: 1rem;
}
.cart-summary .btn { margin-bottom: 0.5rem; }

/* ============================================
   Checkout
   ============================================ */

.checkout-layout { display: grid; grid-template-columns: 1fr 380px; gap: 1.5rem; }

.checkout-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; margin-bottom: 1rem; }
.checkout-card h3 { font-size: 0.95rem; font-weight: 700; margin-bottom: 1rem; }

.balance-display { text-align: center; padding: 1rem; }
.balance-amount { font-size: 2rem; font-weight: 800; display: block; margin-bottom: 0.5rem; }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }

.checkout-items { margin-bottom: 1rem; }
.checkout-item { display: flex; justify-content: space-between; padding: 0.5rem 0; font-size: 0.82rem; color: var(--text-secondary); border-bottom: 1px solid var(--border); }
.checkout-total { display: flex; justify-content: space-between; font-size: 1.05rem; font-weight: 700; padding-top: 0.75rem; }

.payment-method {
    display: flex; align-items: center; gap: 0.85rem;
    padding: 1rem;
    background: var(--bg-subtle);
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
}
.payment-method i { font-size: 1.5rem; color: var(--accent); }
.payment-method p { font-size: 0.78rem; color: var(--text-muted); }

/* ============================================
   Orders
   ============================================ */

.orders-list { display: flex; flex-direction: column; gap: 0.5rem; }

.order-row {
    display: flex; align-items: center;
    padding: 0.85rem 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    gap: 1.5rem;
    transition: all var(--transition);
    color: var(--text-primary);
}
.order-row:hover { border-color: var(--accent); background: var(--accent-light); color: var(--text-primary); }
.order-row-id { font-weight: 700; min-width: 60px; }
.order-row-date { color: var(--text-muted); font-size: 0.82rem; flex: 1; }
.order-row-total { font-weight: 700; min-width: 100px; }
.order-row-action { color: var(--text-muted); }

.status-badge {
    padding: 0.2rem 0.65rem;
    border-radius: 99px;
    font-size: 0.72rem;
    font-weight: 700;
}
.status-completed { background: var(--accent-light); color: var(--green-700); }
.status-pending { background: var(--gold-dim); color: #92400e; }
.status-cancelled { background: #fef2f2; color: #b91c1c; }

.order-status { padding: 0.35rem 1rem; border-radius: 99px; font-size: 0.82rem; font-weight: 700; }
.order-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.order-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; }
.order-card h3 { font-size: 0.95rem; font-weight: 700; margin-bottom: 1rem; padding-bottom: 0.5rem; border-bottom: 1px solid var(--border); }

.order-info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.order-info-item { display: flex; flex-direction: column; }
.order-info-item .label { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }

.order-item-detail { padding: 0.75rem 0; border-bottom: 1px solid var(--border); }
.order-item-header { display: flex; justify-content: space-between; font-size: 0.88rem; margin-bottom: 0.5rem; }
.order-item-name { font-weight: 600; }

.order-keys { margin-top: 0.5rem; }
.keys-label { font-size: 0.78rem; color: var(--text-muted); display: block; margin-bottom: 0.35rem; }

.key-item { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.35rem; }
.key-item code {
    flex: 1; padding: 0.4rem 0.75rem;
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.78rem;
    color: var(--accent);
    user-select: all;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
}

/* ============================================
   Auth Pages
   ============================================ */

.auth-section { display: flex; justify-content: center; align-items: center; padding: 3rem 1rem; }

.auth-card {
    width: 100%; max-width: 420px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    box-shadow: var(--shadow-md);
}

.auth-header { text-align: center; margin-bottom: 2rem; }
.auth-header i { font-size: 2.5rem; color: var(--accent); margin-bottom: 0.75rem; }
.auth-header h2 { font-size: 1.4rem; font-weight: 800; margin-bottom: 0.35rem; }
.auth-header p { color: var(--text-muted); font-size: 0.88rem; }

.auth-form { margin-bottom: 1.5rem; }
.auth-footer { text-align: center; font-size: 0.82rem; color: var(--text-muted); }

/* ============================================
   Profile (redesigned)
   ============================================ */

.profile-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 1.5rem;
    align-items: start;
}

/* --- User card --- */

.profile-user-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.75rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 1rem;
}

.profile-avatar i {
    font-size: 3.5rem;
    color: var(--accent);
    opacity: 0.8;
}

.profile-user-info h3 {
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 0.2rem;
}

.profile-email {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 0.15rem;
}

.profile-joined {
    color: var(--text-muted);
    font-size: 0.78rem;
}

/* --- Stats grid (4 in a row) --- */

.profile-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.profile-stat {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
}

.profile-stat-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
}

.profile-stat-body {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.profile-stat-value {
    font-size: 1.3rem;
    font-weight: 800;
    line-height: 1.2;
    overflow-wrap: break-word;
    word-break: break-word;
}

.profile-stat-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 600;
    margin-top: 0.1rem;
}

.profile-stat-action {
    font-size: 0.75rem;
    color: var(--accent);
    font-weight: 600;
    margin-top: 0.3rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}
.profile-stat-action:hover { color: var(--accent-hover); }

/* --- Section card (details / actions) --- */

.profile-section-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.profile-section-card h3 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.profile-section-card h3 i { color: var(--accent); }

/* --- Details table --- */

.profile-details {
    display: flex;
    flex-direction: column;
}

.profile-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--border);
}
.profile-detail-row:last-child { border-bottom: none; }

.profile-detail-label {
    font-size: 0.82rem;
    color: var(--text-muted);
    font-weight: 500;
}

.profile-detail-value {
    font-size: 0.88rem;
    font-weight: 600;
    text-align: right;
}

.role-badge {
    padding: 0.15rem 0.6rem;
    border-radius: 99px;
    font-size: 0.72rem;
    font-weight: 700;
}

.role-admin {
    background: #fef2f2;
    color: #b91c1c;
}

.role-user {
    background: var(--accent-light);
    color: var(--green-700);
}

/* --- Responsive --- */

@media (max-width: 1024px) {
    .profile-layout { grid-template-columns: 1fr; }
    .profile-stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .profile-stats-grid { grid-template-columns: 1fr 1fr; }
    .profile-user-card { flex-direction: column; text-align: center; }
}

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

/* ============================================
   Deposit
   ============================================ */

.deposit-layout { max-width: 500px; margin: 0 auto; }
.deposit-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-xl); padding: 2rem; }

.current-balance { text-align: center; padding: 1.5rem; background: var(--accent-light); border-radius: var(--radius); margin-bottom: 1.5rem; }
.current-balance span { display: block; color: var(--text-muted); font-size: 0.82rem; margin-bottom: 0.35rem; }
.current-balance strong { font-size: 2rem; font-weight: 800; color: var(--accent); }

.deposit-amounts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; margin-bottom: 1rem; }

.deposit-amount-btn {
    padding: 0.75rem;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition);
}
.deposit-amount-btn:hover, .deposit-amount-btn.active { border-color: var(--accent); background: var(--accent-light); color: var(--accent); }

.deposit-info { margin-top: 1rem; font-size: 0.78rem; color: var(--text-muted); }
.deposit-info p { margin-bottom: 0.25rem; }

/* ============================================
   Pagination
   ============================================ */

.pagination { display: flex; justify-content: center; gap: 0.35rem; margin-top: 2rem; }

.page-link {
    display: flex; align-items: center; justify-content: center;
    width: 36px; height: 36px;
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 0.82rem; font-weight: 700;
    transition: all var(--transition);
}
.page-link:hover { border-color: var(--accent); color: var(--accent); }
.page-link.active { background: var(--accent-gradient); color: white; border-color: transparent; }

/* ============================================
   Wishlist Button
   ============================================ */

.wishlist-btn {
    position: absolute; top: 0.5rem; right: 0.5rem;
    width: 36px; height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(4px);
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 1rem;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all var(--transition);
    z-index: 2;
}
.wishlist-btn:hover { transform: scale(1.1); }
.wishlist-btn.active { color: var(--danger); background: #fef2f2; border-color: #fecaca; }
.wishlist-btn i { pointer-events: none; }
.detail-wishlist { width: 44px; height: 44px; font-size: 1.2rem; }

/* ============================================
   Promo Code
   ============================================ */

.promo-form { margin: 0; }
.promo-input-group { display: flex; gap: 0.5rem; }

.applied-promo {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0.75rem;
    background: var(--accent-light);
    border: 1px solid var(--green-200);
    border-radius: var(--radius-sm);
    color: var(--green-700);
    font-size: 0.82rem;
}

/* ============================================
   Image Upload
   ============================================ */

.current-image { margin-bottom: 0.5rem; }
.current-image img { max-width: 200px; border-radius: var(--radius-sm); margin-bottom: 0.5rem; display: block; border: 1px solid var(--border); }
input[type="file"].form-control { padding: 0.5rem; }
input[type="file"]::file-selector-button {
    padding: 0.3rem 0.75rem; border-radius: var(--radius-sm);
    background: var(--bg-subtle); border: 1px solid var(--border);
    color: var(--text-secondary); cursor: pointer; margin-right: 0.5rem;
}
input[type="file"]::file-selector-button:hover { background: var(--bg-elevated); color: var(--text-primary); }
input[type="color"].form-control { cursor: pointer; }

/* ============================================
   Empty State
   ============================================ */

.empty-state { text-align: center; padding: 4rem 2rem; }
.empty-state i { font-size: 4rem; color: var(--text-muted); margin-bottom: 1rem; opacity: 0.4; }
.empty-state h3 { font-size: 1.25rem; font-weight: 700; margin-bottom: 0.5rem; }
.empty-state p { color: var(--text-muted); margin-bottom: 1.5rem; }

/* ============================================
   Footer
   ============================================ */

.footer { text-align: center; padding: 1.5rem 2rem; border-top: 1px solid var(--border); margin-top: auto; }
.footer p { color: var(--text-muted); font-size: 0.78rem; }

/* ============================================
   Admin Layout
   ============================================ */

.admin-layout { display: flex; min-height: 100vh; width: 100%; }

.admin-sidebar {
    width: 220px;
    background: var(--bg-white);
    border-right: 1px solid var(--border);
    display: flex; flex-direction: column;
    flex-shrink: 0;
    position: relative;
    z-index: 100;
}

.admin-sidebar-header {
    padding: 1.25rem;
    font-size: 1.05rem; font-weight: 800;
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; gap: 0.5rem;
    color: var(--accent);
    letter-spacing: -0.02em;
}

.admin-nav { flex: 1; padding: 0.5rem 0; }

.admin-nav-item {
    display: flex; align-items: center; gap: 0.65rem;
    padding: 0.55rem 1.25rem;
    color: var(--text-secondary);
    font-size: 0.82rem;
    transition: all var(--transition);
    border-left: 3px solid transparent;
    font-weight: 500;
}
.admin-nav-item:hover { background: var(--accent-light); color: var(--accent); }
.admin-nav-item.active { background: var(--accent-light); color: var(--accent); border-left-color: var(--accent); font-weight: 600; }
.admin-nav hr { border: none; border-top: 1px solid var(--border); margin: 0.5rem 1rem; }

.admin-main { flex: 1; min-width: 0; }

.admin-sidebar-backdrop {
    display: none;
    position: fixed; inset: 0; background: rgba(0,0,0,0.4);
    z-index: 99; opacity: 0; transition: opacity var(--transition);
}
.admin-sidebar-backdrop.visible { display: block; opacity: 1; }

.admin-menu-btn {
    display: none;
    background: none; border: none; color: var(--text-secondary);
    font-size: 1.15rem; cursor: pointer; padding: 0; line-height: 1;
}

.admin-topbar {
    height: var(--topbar-height);
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center;
    padding: 0 2rem;
    position: sticky; top: 0; z-index: 100;
    gap: 0.75rem;
}
.admin-topbar h2 { font-size: 1.05rem; font-weight: 700; flex: 1; }
.admin-topbar-user { display: flex; align-items: center; gap: 0.5rem; font-size: 0.82rem; color: var(--text-secondary); white-space: nowrap; }
.admin-content { padding: 2rem; }

.admin-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; margin-bottom: 2rem; }

.stat-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; display: flex; align-items: center; gap: 1rem; }

.stat-icon {
    width: 48px; height: 48px;
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem; color: white;
    flex-shrink: 0;
}
.stat-body { display: flex; flex-direction: column; }
.stat-value { font-size: 1.4rem; font-weight: 800; }
.stat-label { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }

.admin-table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }

.admin-table th {
    text-align: left; padding: 0.65rem 0.75rem;
    color: var(--text-muted);
    font-weight: 700;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-bottom: 1px solid var(--border);
}
.admin-table td { padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--border); }
.admin-table tbody tr:hover { background: var(--bg-subtle); }
.admin-table .actions { display: flex; gap: 0.25rem; align-items: center; }

.admin-section { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; margin-bottom: 1rem; }
.admin-section h3, .admin-section h4 { font-size: 0.95rem; font-weight: 700; margin: 0 0 0.75rem 0; }
.admin-section-header { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 0.75rem; }
.admin-section-header h3, .admin-section-header h4 { margin: 0; display: flex; align-items: center; gap: 0.5rem; font-size: 1rem; }
.admin-form { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; }
.admin-form-wide { max-width: 900px; }
.admin-filters { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.admin-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.admin-actions-bar { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }

/* Dashboard redesign */
.dash-welcome {
    display: flex; justify-content: space-between; align-items: center;
    gap: 1rem; margin-bottom: 1.5rem; flex-wrap: wrap;
}
.dash-welcome-text h2 { font-size: 1.2rem; font-weight: 700; margin: 0 0 0.25rem 0; }
.dash-welcome-text p { font-size: 0.85rem; color: var(--text-muted); margin: 0; }
.dash-welcome-actions { display: flex; gap: 0.5rem; }

.dash-stats-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0.75rem; margin-bottom: 1.5rem; }

.dash-stat-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 1rem; display: flex;
    flex-direction: column; gap: 0.5rem;
}
.dash-stat-icon {
    width: 38px; height: 38px; border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem;
}
.dash-stat-icon-green { background: var(--accent-light); color: var(--green-700); }
.dash-stat-icon-blue { background: #eef2ff; color: #4338ca; }
.dash-stat-icon-amber { background: #fffbeb; color: #92400e; }
.dash-stat-icon-purple { background: #f5f3ff; color: #7c3aed; }
.dash-stat-icon-red { background: #fef2f2; color: #b91c1c; }
.dash-stat-body { flex: 1; }
    .dash-stat-value { display: block; font-size: 1.35rem; font-weight: 800; line-height: 1.2; }
.dash-stat-label { display: block; font-size: 0.72rem; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; margin-top: 0.1rem; }
.dash-stat-trend { font-size: 0.72rem; }
.dash-stat-link { color: var(--accent); font-weight: 600; }
.dash-stat-link:hover { text-decoration: underline; }
.dash-stat-alert { color: #92400e; font-weight: 600; }
.dash-stat-ok { color: var(--green-700); font-weight: 600; }

.dash-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 1rem; }
.dash-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 1.25rem;
}
.dash-card-header {
    display: flex; justify-content: space-between; align-items: center;
    gap: 0.75rem; flex-wrap: wrap; margin-bottom: 1rem;
}
.dash-card-header h3 {
    font-size: 0.95rem; font-weight: 700; margin: 0;
    display: flex; align-items: center; gap: 0.45rem;
}
.dash-card-full { grid-column: 1 / -1; }

.dash-empty {
    text-align: center; padding: 2.5rem 1rem; color: var(--text-muted);
}
.dash-empty i { font-size: 2.5rem; opacity: 0.3; margin-bottom: 0.75rem; display: block; }
.dash-empty p { font-size: 0.88rem; margin: 0 0 1rem 0; }
.admin-table-wrap { overflow-x: auto; }

/* Filter bar */
.filter-bar { display: flex; gap: 0.35rem; flex-wrap: wrap; margin-bottom: 1rem; }
.filter-btn {
    padding: 0.4rem 0.85rem; border-radius: var(--radius-sm);
    background: var(--bg-subtle); border: 1px solid var(--border);
    color: var(--text-secondary); font-size: 0.82rem; font-weight: 600;
    transition: all var(--transition);
}
.filter-btn:hover { border-color: var(--accent); color: var(--accent); }
.filter-active { background: var(--accent); border-color: var(--accent); color: white; }
.filter-active:hover { color: white; opacity: 0.9; }

/* Badges */
.badge { display: inline-flex; align-items: center; padding: 0.2rem 0.55rem; border-radius: 99px; font-size: 0.72rem; font-weight: 700; }
.badge-green { background: var(--accent-light); color: var(--green-700); }
.badge-red { background: #fef2f2; color: #b91c1c; }
.badge-blue { background: #eef2ff; color: #4338ca; }
.badge-gray { background: var(--bg-subtle); color: var(--text-muted); }

/* Order ID */
.order-id { font-weight: 700; color: var(--text-primary); font-size: 0.82rem; }

/* Product cell in table */
.product-cell { display: flex; align-items: center; gap: 0.65rem; }
.product-thumb { width: 36px; height: 36px; border-radius: var(--radius-sm); object-fit: cover; border: 1px solid var(--border); flex-shrink: 0; }
.product-cell-name { font-weight: 600; }

/* Status form */
.status-form { margin: 0; }
.status-control { display: flex; align-items: center; }
.status-select {
    padding: 0.25rem 0.5rem; border-radius: var(--radius-sm);
    font-size: 0.78rem; font-weight: 600; cursor: pointer;
    border: 1px solid var(--border); font-family: inherit;
}
.status-pending { background: #fffbeb; color: #92400e; border-color: #fde68a; }
.status-completed { background: var(--accent-light); color: var(--green-700); border-color: var(--green-200); }
.status-cancelled { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }

/* Top products list */
.top-products-list { display: flex; flex-direction: column; gap: 0.75rem; }
.top-product-item { display: flex; align-items: center; gap: 0.75rem; }
.top-product-rank {
    width: 28px; height: 28px; border-radius: 50%;
    background: var(--accent-light); color: var(--accent);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.75rem; font-weight: 800; flex-shrink: 0;
}
.top-product-item:first-child .top-product-rank { background: var(--accent); color: white; }
.top-product-info { flex: 1; min-width: 0; }
.top-product-name { display: block; font-size: 0.85rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-product-sold { display: block; font-size: 0.72rem; color: var(--text-muted); margin-top: 0.1rem; }
.top-product-bar { flex: 0 0 120px; height: 6px; background: var(--bg-subtle); border-radius: 99px; overflow: hidden; }
.top-product-bar-fill { height: 100%; background: var(--accent-gradient); border-radius: 99px; transition: width 0.6s ease; }

/* Keys summary */
.keys-summary { display: flex; gap: 1rem; margin-bottom: 1.5rem; }
.keys-summary-item {
    flex: 1; text-align: center;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 1rem;
}
.keys-summary-number { display: block; font-size: 1.6rem; font-weight: 800; line-height: 1.2; }
.keys-summary-label { display: block; font-size: 0.72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; font-weight: 600; margin-top: 0.2rem; }
.keys-scroll { max-height: 320px; overflow-y: auto; }
.key-value { font-family: 'Courier New', monospace; font-size: 0.82rem; background: var(--bg-subtle); padding: 0.15rem 0.4rem; border-radius: 3px; }

/* Category list */
.category-list { display: flex; flex-direction: column; gap: 0.35rem; }
.category-list-item {
    background: var(--bg-white); border: 1px solid var(--border);
    border-radius: var(--radius-sm); overflow: hidden;
}
.category-list-item details { padding: 0.5rem 0.75rem; }
.category-list-item details[open] { background: var(--bg-subtle); }
.category-summary {
    display: flex; align-items: center; justify-content: space-between;
    cursor: pointer; gap: 0.5rem; list-style: none;
}
.category-summary::-webkit-details-marker { display: none; }
.category-summary-main { display: flex; align-items: center; gap: 0.5rem; font-weight: 600; font-size: 0.88rem; }
.category-summary-main i { color: var(--accent); width: 16px; text-align: center; }
.category-edit-form { margin-top: 0.75rem; padding: 1rem; background: var(--bg-white); border: 1px solid var(--border); border-radius: var(--radius-sm); }

/* Settings cards */
.settings-card { margin-bottom: 1.5rem; }
.settings-card-title { font-size: 0.95rem; font-weight: 700; margin-bottom: 1rem; padding-bottom: 0.5rem; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 0.5rem; }
.color-input-wrap { display: flex; align-items: center; gap: 0.75rem; }
.color-input-wrap input[type="color"] { width: 48px; height: 40px; padding: 2px; border-radius: var(--radius-sm); }
.color-input-wrap span { font-size: 0.82rem; color: var(--text-muted); font-family: monospace; }

/* Search inline */
.search-inline { display: flex; gap: 0.35rem; align-items: center; }
.search-inline .form-control { width: 220px; }

/* Balance form inline */
.balance-form { display: flex; gap: 0.25rem; align-items: center; }
.balance-form .form-control { width: 100px; padding: 0.25rem 0.4rem; font-size: 0.82rem; }

/* Promo code */
.promo-code-label { font-family: 'Courier New', monospace; letter-spacing: 0.05em; }

.text-muted { color: var(--text-muted); }
.chart-container { background: var(--bg-white); border-radius: var(--radius-sm); padding: 1rem; border: 1px solid var(--border); }

/* ============================================
   Toast
   ============================================ */

@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.2); } }
.cart-badge.pulse { animation: pulse 0.3s ease; }

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 1024px) {
    .product-detail { grid-template-columns: 1fr; }
    .cart-layout, .checkout-layout { grid-template-columns: 1fr; }
    .order-detail { grid-template-columns: 1fr; }
    .categories-grid { grid-template-columns: repeat(3, 1fr); }
    .features-grid { grid-template-columns: repeat(2, 1fr); }
    .category-card:last-child:nth-child(5) { grid-column: 1 / -1; grid-template-columns: auto 1fr; }
}

@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .sidebar-toggle { display: block; }
    .main-content { margin-left: 0; }
    .container { padding: 1rem; }
    .topbar { padding: 0 1rem; }
    .hero h1 { font-size: 1.6rem; }
    .hero { padding: 2.5rem 1rem; }
    .hero p { font-size: 0.92rem; }
    .hero-search { max-width: 100%; }
    .hero-categories { gap: 0.35rem; }
    .hero-cat-pill { font-size: 0.72rem; padding: 0.3rem 0.65rem; }
    .stat-divider:nth-child(4) { display: none; }
    .stats-bar { flex-wrap: wrap; padding: 1rem; }
    .stat-item { flex: 0 0 45%; padding: 0.5rem; }
    .stat-number { font-size: 1.3rem; }
    .products-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
    .form-grid { grid-template-columns: 1fr; }
    .admin-layout { position: relative; }
    .admin-sidebar { position: fixed; top: 0; left: 0; bottom: 0; min-height: 0; transform: translateX(-100%); transition: transform 0.3s ease; z-index: 110; }
    .admin-sidebar.open { transform: translateX(0); }
    .admin-main { margin-left: 0; }
    .admin-menu-btn { display: block; }
    .admin-topbar { padding: 0 1rem; }
    .admin-content { padding: 0.75rem; }
    .user-name { display: none; }
    .admin-stats { grid-template-columns: 1fr 1fr; }
    .admin-grid-2 { grid-template-columns: 1fr; }
    .dash-stats-row { grid-template-columns: repeat(3, 1fr); }
    .dash-grid { grid-template-columns: 1fr; }
    .dash-welcome { flex-direction: column; align-items: flex-start; }
    .keys-summary { gap: 0.5rem; }
    .search-inline .form-control { width: 140px; }
    .admin-table-wrap { overflow-x: auto; }
    .admin-table { min-width: 600px; }
    .product-detail-actions { flex-direction: column; }
    .deposit-amounts { grid-template-columns: repeat(2, 1fr); }
    .catalog-controls { overflow-x: auto; padding-bottom: 0.5rem; }
    .profile-layout { grid-template-columns: 1fr; }
    .profile-stats-grid { grid-template-columns: repeat(2, 1fr); }
    .categories-grid { grid-template-columns: repeat(2, 1fr); }
    .category-card:last-child:nth-child(5) { grid-template-columns: 1fr; text-align: center; gap: 0.5rem; padding: 1rem; }
    .category-card:last-child:nth-child(5) .category-icon { margin: 0 auto; }
    .category-card:last-child:nth-child(5) .category-count { justify-self: center; }
    .features-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
    .products-grid { grid-template-columns: 1fr 1fr; gap: 0.65rem; }
    .product-card-image { height: 130px; }
    .product-card-body { padding: 0.65rem; }
    .product-card-body h3 { font-size: 0.8rem; }
    .hero h1 { font-size: 1.3rem; }
    .hero p { font-size: 0.85rem; }
    .hero-search { flex-direction: column; background: none; border: none; padding: 0; gap: 0.5rem; }
    .hero-search input { background: var(--bg-white); border: 1px solid var(--border); border-radius: var(--radius); padding: 0.6rem 0.85rem; }
    .hero-search .btn { width: 100%; }
    .hero-actions { flex-direction: column; align-items: center; }
    .hero-cat-pill { font-size: 0.68rem; padding: 0.25rem 0.5rem; }
    .stats-bar { flex-direction: column; gap: 0.75rem; padding: 1rem; align-items: stretch; }
    .stat-divider { display: none; }
    .stat-item { flex: none; padding: 0.25rem 0; }
    .categories-grid { grid-template-columns: 1fr 1fr; }
    .features-grid { grid-template-columns: 1fr; }
    .cta-section { padding: 2rem 1rem; }
    .cta-content h2 { font-size: 1.15rem; }
    .deposit-amounts { grid-template-columns: 1fr 1fr; }
    .product-card-actions { flex-wrap: wrap; }
    .wishlist-btn-sm { width: 28px; height: 28px; font-size: 0.7rem; }
    /* Admin mobile */
    .admin-stats { grid-template-columns: 1fr; }
    .dash-stats-row { grid-template-columns: 1fr 1fr; }
    .dash-welcome-actions { width: 100%; }
    .dash-welcome-actions .btn { flex: 1; text-align: center; }
    .search-inline { flex-direction: column; align-items: stretch; }
    .search-inline .form-control { width: 100%; }
    .balance-form .form-control { width: 70px; }
    .category-summary { flex-wrap: wrap; }
    .keys-summary { flex-direction: column; }
    .admin-section-header { flex-direction: column; align-items: flex-start; }
    .admin-actions-bar { flex-direction: column; align-items: stretch; }
    .admin-actions-bar .btn { text-align: center; }
}
