/**
 * HMOD Shop Theme
 * Dark/Light mode support with sidebar layout
 * Version: 2.0.0
 */

/* ===== CSS VARIABLES ===== */
:root {
    /* Primary Colors */
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --primary-light: #60a5fa;
    --secondary: #8b5cf6;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;

    /* RGB values for rgba() */
    --primary-rgb: 59, 130, 246;
    --success-rgb: 16, 185, 129;
    --danger-rgb: 239, 68, 68;
    --warning-rgb: 245, 158, 11;

    /* Layout */
    --sidebar-width: 280px;
    --sidebar-collapsed-width: 80px;
    --header-height: 70px;
    --transition-speed: 0.3s;
    --radius: 8px;
    --radius-lg: 12px;
    --radius-sm: 6px;

    /* Spacing */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;

    /* Font */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
}

/* ===== DARK THEME (Default) ===== */
[data-theme="dark"], :root {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --bg-card: rgba(30, 41, 59, 0.8);

    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    --border-color: rgba(148, 163, 184, 0.1);
    --border-secondary: rgba(148, 163, 184, 0.1);

    --sidebar-bg: #1e293b;
    --header-bg: rgba(15, 23, 42, 0.95);
    --card-bg: rgba(30, 41, 59, 0.8);
    --input-bg: #0f172a;
    --hover-bg: rgba(255, 255, 255, 0.05);
    --nav-hover-bg: rgba(255, 255, 255, 0.05);

    --shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);

    --accent-primary: #3b82f6;
}

/* ===== LIGHT THEME ===== */
[data-theme="light"] {
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --bg-card: #ffffff;

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

    --border-color: rgba(148, 163, 184, 0.2);
    --border-secondary: rgba(148, 163, 184, 0.2);

    --sidebar-bg: #ffffff;
    --header-bg: rgba(255, 255, 255, 0.95);
    --card-bg: #ffffff;
    --input-bg: #f8fafc;
    --hover-bg: rgba(0, 0, 0, 0.03);
    --nav-hover-bg: rgba(0, 0, 0, 0.03);

    --shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);

    --accent-primary: #3b82f6;
}

/* ===== RESET & BASE ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: var(--font-family);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    transition: background-color var(--transition-speed), color var(--transition-speed);
}

a { color: var(--primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--primary-dark); }

/* ===== LAYOUT WITH SIDEBAR ===== */
.shop-layout {
    display: flex;
    min-height: 100vh;
}

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    transition: margin-left var(--transition-speed);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.content-wrapper {
    flex: 1;
    padding: 30px;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

/* ===== SIDEBAR ===== */
.shop-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--border-secondary);
    display: flex;
    flex-direction: column;
    transition: all var(--transition-speed) cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    overflow-y: auto;
    overflow-x: hidden;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.shop-sidebar::-webkit-scrollbar {
    display: none;
}

/* Sidebar Header */
.sidebar-header {
    padding: var(--space-5) var(--space-5);
    border-bottom: 1px solid var(--border-secondary);
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
    box-sizing: border-box;
    flex-shrink: 0;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    color: var(--text-primary);
    text-decoration: none;
}

.sidebar-logo .logo-icon {
    color: var(--primary);
    flex-shrink: 0;
}

.sidebar-logo .logo-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sidebar-logo .logo-title {
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.sidebar-logo .logo-subtitle {
    font-size: var(--text-xs);
    font-weight: 500;
    color: var(--text-secondary);
    opacity: 0.8;
}

/* Sidebar User */
.sidebar-user {
    padding: var(--space-4) var(--space-5);
    border-bottom: 1px solid var(--border-secondary);
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.sidebar-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: var(--text-base);
    flex-shrink: 0;
}

.sidebar-user-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow: hidden;
}

.sidebar-user-info .user-name {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-info .user-role {
    font-size: var(--text-xs);
    color: var(--text-muted);
}

.sidebar-user-info .user-balance {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--success);
}

/* Sidebar Navigation */
.sidebar-nav {
    flex: 1;
    padding: var(--space-3) 0;
    overflow-y: auto;
}

.nav-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-item {
    margin: 0;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-5);
    color: var(--text-secondary);
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
    text-decoration: none;
}

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

.nav-link.active {
    background: rgba(245, 158, 11, 0.1);
    color: var(--primary);
    border-left-color: var(--primary);
}

.nav-icon {
    flex-shrink: 0;
    opacity: 0.8;
}

.nav-link:hover .nav-icon,
.nav-link.active .nav-icon {
    opacity: 1;
}

.nav-label {
    flex: 1;
    font-size: var(--text-sm);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-badge {
    background: var(--primary);
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: var(--text-xs);
    font-weight: 600;
    min-width: 20px;
    text-align: center;
}

.nav-separator {
    height: 1px;
    background: var(--border-secondary);
    margin: var(--space-3) var(--space-5);
}

/* Sidebar Footer */
.sidebar-footer {
    padding: var(--space-4) var(--space-5);
    border-top: 1px solid var(--border-secondary);
    margin-top: auto;
}

.theme-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    width: 100%;
    padding: var(--space-3);
    background: var(--hover-bg);
    border: 1px solid var(--border-secondary);
    border-radius: var(--radius);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    font-size: var(--text-sm);
}

.theme-toggle-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* Theme toggle icons */
.theme-icon-dark,
.theme-icon-light {
    flex-shrink: 0;
}

[data-theme="dark"] .theme-icon-light,
[data-theme="light"] .theme-icon-dark {
    display: none;
}

[data-theme="dark"] .theme-icon-dark,
[data-theme="light"] .theme-icon-light {
    display: block;
}

.theme-text {
    white-space: nowrap;
}

.sidebar-version {
    margin-top: var(--space-3);
    text-align: center;
    font-size: var(--text-xs);
    color: var(--text-muted);
}

/* Sidebar Overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity var(--transition-speed);
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

/* ===== HEADER ===== */
.shop-header {
    background: var(--header-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-secondary);
    height: var(--header-height);
    padding: 0 var(--space-6);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    box-sizing: border-box;
}

.header-left {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.sidebar-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: transparent;
    border: 1px solid var(--border-secondary);
    border-radius: var(--radius);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.sidebar-toggle:hover {
    background: var(--hover-bg);
    color: var(--primary);
    border-color: var(--primary);
}

.header-title {
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--text-primary);
}

.header-right {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius);
    font-size: var(--text-sm);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    white-space: nowrap;
}

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

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(var(--primary-rgb), 0.3);
    background: var(--primary-dark);
    color: white;
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-secondary);
}

.btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
}

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

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

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

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(var(--success-rgb), 0.3);
    filter: brightness(1.1);
    color: white;
}

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

.btn-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(var(--warning-rgb), 0.3);
    filter: brightness(1.1);
    color: white;
}

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

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(var(--danger-rgb), 0.3);
    filter: brightness(1.1);
    color: white;
}

.btn-block { width: 100%; }
.btn-sm { padding: 8px 16px; font-size: 0.85rem; }
.btn-lg { padding: 14px 28px; font-size: 1rem; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }

/* ===== CARDS ===== */
.card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-secondary);
    overflow: hidden;
    transition: all 0.3s;
}

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

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
}

.card-body {
    padding: 20px;
}

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

.product-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-secondary);
    overflow: hidden;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 20px 40px rgba(245, 158, 11, 0.15);
}

.product-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    flex: 1;
}

.product-image {
    position: relative;
    height: 200px;
    background: var(--bg-secondary);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--danger);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.product-badge.featured {
    background: var(--primary);
}

.product-badge.flash-sale {
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    animation: flashPulse 2s ease-in-out infinite;
}

@keyframes flashPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
    50% { transform: scale(1.05); box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
}

.product-info {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-name {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #f59e0b 0%, #ef4444 50%, #ec4899 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: all 0.3s ease;
}

.product-card:hover .product-name {
    filter: brightness(1.2);
    transform: scale(1.02);
}

.product-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 0.8rem;
    color: var(--text-muted);
    flex-wrap: wrap;
}

.product-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.product-meta i {
    color: var(--primary);
}

/* Product Meta Badges - 2 góc nổi bật */
.product-meta-badges {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    gap: 10px;
}

.meta-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.meta-badge i {
    font-size: 0.85rem;
}

.meta-badge-packages {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(37, 99, 235, 0.15));
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.meta-badge-sold {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.15), rgba(22, 163, 74, 0.15));
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.product-card:hover .meta-badge-packages {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.25), rgba(37, 99, 235, 0.25));
    border-color: rgba(59, 130, 246, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.product-card:hover .meta-badge-sold {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.25), rgba(22, 163, 74, 0.25));
    border-color: rgba(34, 197, 94, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.2);
}

.product-price {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: auto;
}

.price-current {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--success);
}

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

.product-actions {
    padding: 0 20px 20px;
}

.product-actions .btn {
    width: 100%;
}

/* ===== ALERTS ===== */
.alert {
    padding: 15px 20px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid var(--danger);
    color: #fca5a5;
}

.alert-success {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid var(--success);
    color: #6ee7b7;
}

.alert-info {
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid var(--info);
    color: #93c5fd;
}

.alert-warning {
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid var(--warning);
    color: #fcd34d;
}

[data-theme="light"] .alert-error { color: #dc2626; }
[data-theme="light"] .alert-success { color: #059669; }
[data-theme="light"] .alert-info { color: #2563eb; }
[data-theme="light"] .alert-warning { color: #d97706; }

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.form-group label i {
    margin-right: 6px;
    color: var(--primary);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

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

.auth-container {
    width: 100%;
    max-width: 420px;
}

.auth-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    padding: 40px 30px;
    box-shadow: var(--shadow);
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.auth-logo .logo-icon {
    color: var(--primary);
}

.auth-header h1 {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.auth-header p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.auth-form .form-group {
    margin-bottom: 20px;
}

.auth-footer {
    text-align: center;
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px solid var(--border-color);
}

.auth-footer p {
    margin-bottom: 10px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.auth-footer a {
    color: var(--primary);
    font-weight: 500;
}

/* ===== HERO SECTION ===== */
.hero {
    padding: 50px 0;
    text-align: center;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.05), rgba(59, 130, 246, 0.05));
    border-radius: var(--radius-lg);
    margin-bottom: 30px;
}

.hero h1 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 15px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    max-width: 500px;
    margin: 0 auto 25px;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 50px;
    margin-top: 35px;
}

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

.hero-stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary);
}

.hero-stat-label {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ===== SECTION ===== */
.section {
    margin-bottom: 40px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 25px;
}

.section-title {
    font-size: 1.4rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title i {
    color: var(--primary);
}

/* ===== EMPTY STATE ===== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state svg {
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--text-primary);
}

/* ===== TABLES ===== */
.table-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.table-responsive {
    overflow-x: auto;
}

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

th, td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    background: var(--bg-secondary);
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

td {
    font-size: 0.9rem;
}

tr:hover {
    background: var(--hover-bg);
}

/* ===== BADGES ===== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-success { background: rgba(16, 185, 129, 0.2); color: #34d399; }
.badge-danger { background: rgba(239, 68, 68, 0.2); color: #f87171; }
.badge-warning { background: rgba(245, 158, 11, 0.2); color: #fbbf24; }
.badge-info { background: rgba(59, 130, 246, 0.2); color: #60a5fa; }
.badge-muted { background: rgba(148, 163, 184, 0.2); color: #94a3b8; }

[data-theme="light"] .badge-success { color: #059669; }
[data-theme="light"] .badge-danger { color: #dc2626; }
[data-theme="light"] .badge-warning { color: #d97706; }
[data-theme="light"] .badge-info { color: #2563eb; }

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

.stat-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    padding: 25px;
    text-align: center;
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 5px;
}

.stat-card .stat-label {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ===== LOADING ===== */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .sidebar-toggle {
        display: flex;
    }

    .shop-sidebar {
        transform: translateX(-100%);
    }

    .shop-sidebar.mobile-open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .sidebar-overlay.active {
        display: block;
        opacity: 1;
    }
}

@media (max-width: 768px) {
    .content-wrapper {
        padding: 20px 15px;
    }

    .hero h1 {
        font-size: 1.6rem;
    }

    .hero-stats {
        flex-wrap: wrap;
        gap: 25px;
    }

    .products-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .shop-header {
        padding: 0 15px;
    }

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

@media (max-width: 480px) {
    .auth-card {
        padding: 30px 20px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== USER DROPDOWN ===== */
.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--card-bg);
    border: 1px solid var(--border-secondary);
    border-radius: var(--radius);
    min-width: 180px;
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s;
    z-index: 1000;
}

.user-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(5px);
}

.user-dropdown a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.user-dropdown a:hover {
    background: var(--hover-bg);
    color: var(--primary);
}

.user-dropdown a i {
    width: 18px;
}

/* ===== LIGHT THEME - Product Meta Badges ===== */
[data-theme="light"] .meta-badge-packages {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(37, 99, 235, 0.1));
    color: #2563eb;
    border: 1px solid rgba(59, 130, 246, 0.25);
}

[data-theme="light"] .meta-badge-sold {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.1), rgba(22, 163, 74, 0.1));
    color: #16a34a;
    border: 1px solid rgba(34, 197, 94, 0.25);
}

[data-theme="light"] .product-card:hover .meta-badge-packages {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(37, 99, 235, 0.2));
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

[data-theme="light"] .product-card:hover .meta-badge-sold {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.2), rgba(22, 163, 74, 0.2));
    border-color: rgba(34, 197, 94, 0.4);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.15);
}

