/* ============================================
   MODURASPACE ADMIN PANEL - PROFESSIONAL CSS
   UPDATED WITH MODERN DASHBOARD DESIGN
   ============================================ */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:ital,wght@0,100..900;1,100..900&display=swap');

/* CSS Variables - Light Mode (Default) */
:root {
    --primary: #4f46e5;
    --primary-dark: #4338ca;
    --primary-light: #818cf8;
    --secondary: #8b5cf6;
    --secondary-dark: #7c3aed;
    --success: #10b981;
    --success-dark: #059669;
    --danger: #ef4444;
    --danger-dark: #dc2626;
    --warning: #f59e0b;
    --info: #3b82f6;
    --dark: #1e293b;
    --dark-light: #334155;
    --gray: #64748b;
    --gray-light: #94a3b8;
    --light: #f8fafc;
    --white: #ffffff;
    --border: #e2e8f0;
    --border-dark: #cbd5e1;
    --bg-gradient-start: #f5f3ff;
    --bg-gradient-end: #ede9fe;
    --card-bg: #ffffff;
    --sidebar-bg-start: #1e293b;
    --sidebar-bg-end: #0f172a;
    --sidebar-text: rgba(255, 255, 255, 0.7);
    --sidebar-text-hover: #ffffff;
    --top-bar-bg: #ffffff;
    
    /* Shadows */
    --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1);
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 20px 25px -5px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    
    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Mode Variables */
[data-theme="dark"] {
    --primary: #818cf8;
    --primary-dark: #6366f1;
    --primary-light: #a5b4fc;
    --secondary: #a78bfa;
    --secondary-dark: #8b5cf6;
    --dark: #f1f5f9;
    --dark-light: #cbd5e1;
    --gray: #94a3b8;
    --gray-light: #64748b;
    --light: #1e293b;
    --white: #0f172a;
    --border: #334155;
    --border-dark: #475569;
    --bg-gradient-start: #0f172a;
    --bg-gradient-end: #1e1b4b;
    --card-bg: #1e293b;
    --sidebar-bg-start: #020617;
    --sidebar-bg-end: #0f172a;
    --sidebar-text: rgba(255, 255, 255, 0.6);
    --sidebar-text-hover: #ffffff;
    --top-bar-bg: #1e293b;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Inter", sans-serif;
    background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
    min-height: 100vh;
    color: var(--dark);
    line-height: 1.5;
    transition: background 0.3s ease, color 0.3s ease;
}

/* ============================================
   LOGIN PAGE STYLES
   ============================================ */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
}

.login-container::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 70%);
    animation: pulse 10s ease infinite;
}

@keyframes pulse {
    0%, 100% { transform: translate(-25%, -25%) scale(1); opacity: 0.5; }
    50% { transform: translate(-25%, -25%) scale(1.1); opacity: 0.3; }
}

.login-card {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    width: 100%;
    max-width: 480px;
    box-shadow: var(--shadow-xl);
    position: relative;
    z-index: 1;
    animation: slideUp 0.5s ease;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header h1 {
    font-size: 2.25rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 0.5rem;
}

.login-header p {
    color: var(--gray);
    font-size: 0.875rem;
}

.login-badge {
    background: linear-gradient(135deg, #e0e7ff 0%, #ede9fe 100%);
    padding: 0.75rem;
    border-radius: var(--radius);
    text-align: center;
    margin-bottom: 1.5rem;
}

.login-badge span {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--primary-dark);
}

.btn-google {
    width: 100%;
    background: var(--white);
    border: 1px solid var(--border);
    padding: 0.875rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    cursor: pointer;
    transition: var(--transition);
    color: var(--dark);
}

.btn-google:hover {
    background: var(--light);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.divider {
    text-align: center;
    margin: 1.5rem 0;
    position: relative;
}

.divider::before,
.divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: calc(50% - 35px);
    height: 1px;
    background: var(--border);
}

.divider::before { left: 0; }
.divider::after { right: 0; }

.divider span {
    background: var(--white);
    padding: 0 1rem;
    color: var(--gray);
    font-size: 0.875rem;
}

.input-group {
    margin-bottom: 1.25rem;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--dark);
}

.input-group input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    transition: var(--transition);
    font-family: inherit;
    background: var(--white);
    color: var(--dark);
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.btn-primary {
    width: 100%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: var(--white);
    padding: 0.875rem;
    border: none;
    border-radius: var(--radius);
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
}

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

.error-message {
    background: #fef2f2;
    color: var(--danger);
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    margin-top: 1rem;
    font-size: 0.875rem;
    display: none;
    border-left: 3px solid var(--danger);
}

/* ============================================
   DASHBOARD LAYOUT
   ============================================ */
.dashboard-wrapper {
    display: flex;
    min-height: 100vh;
    position: relative;
}

/* 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: 99;
}

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

/* Sidebar */
.sidebar {
    width: 280px;
    background: linear-gradient(180deg, var(--sidebar-bg-start) 0%, var(--sidebar-bg-end) 100%);
    color: var(--white);
    position: fixed;
    height: 100vh;
    transition: transform 0.3s ease;
    z-index: 100;
    overflow-y: auto;
    transform: translateX(0);
}

.sidebar-header {
    padding: 1.75rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-header h2 {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #a5b4fc 0%, #c4b5fd 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.sidebar-header p {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 0.25rem;
}

.sidebar-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 1.25rem;
    cursor: pointer;
    display: none;
    transition: var(--transition);
}

.sidebar-close:hover {
    color: var(--white);
}

.sidebar-nav {
    padding: 0 0.75rem;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.875rem 1rem;
    color: var(--sidebar-text);
    text-decoration: none;
    border-radius: var(--radius);
    margin-bottom: 0.25rem;
    transition: var(--transition);
    font-weight: 500;
}

.sidebar-nav a i {
    width: 22px;
    font-size: 1.125rem;
}

.sidebar-nav a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--sidebar-text-hover);
}

.sidebar-nav a.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: var(--white);
    box-shadow: var(--shadow);
}

.sidebar-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.logout-btn {
    width: 100%;
    background: rgba(239, 68, 68, 0.2);
    color: #fecaca;
    border: none;
    padding: 0.75rem;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

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

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 280px;
    min-height: 100vh;
}

.top-bar {
    background: var(--top-bar-bg);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 99;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--dark);
}

.right-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.theme-toggle {
    background: var(--light);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.5rem;
    cursor: pointer;
    transition: var(--transition);
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.theme-toggle:hover {
    background: var(--border);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.875rem;
}

.user-avatar {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    color: var(--white);
}

#userEmail {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--dark);
}

.content-area {
    padding: 2rem;
}

/* Page Headers */
.page-header {
    margin-bottom: 2rem;
}

.page-header h1 {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 0.25rem;
}

.page-header p {
    color: var(--gray);
    font-size: 0.875rem;
}

/* Stats Cards - Modern Dashboard */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.stat-card .icon {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--secondary) 100%);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.stat-card .icon i {
    font-size: 1.5rem;
    color: var(--white);
}

.stat-card .value {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--dark);
    line-height: 1.2;
}

.stat-card .label {
    color: var(--gray);
    font-size: 0.875rem;
    font-weight: 500;
    margin-top: 0.25rem;
}

/* Section Cards */
.section-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.75rem;
    border: 1px solid var(--border);
}

.section-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--dark);
}

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

/* Form Styles */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--dark);
}

.form-group label .required {
    color: var(--danger);
    margin-left: 0.25rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.875rem;
    transition: var(--transition);
    font-family: inherit;
    background: var(--white);
    color: var(--dark);
}

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

/* Form Row for multiple fields */
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

/* Price Input Group */
.price-input-group {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.currency-select {
    width: 100px !important;
    flex-shrink: 0;
}

/* Image Upload Area */
.image-upload-area {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: var(--light);
}

.image-upload-area:hover {
    border-color: var(--primary);
    background: #f5f3ff;
}

[data-theme="dark"] .image-upload-area:hover {
    background: #2d2b5e;
}

.image-upload-area i {
    font-size: 2.5rem;
    color: var(--gray);
    margin-bottom: 0.5rem;
}

.image-upload-area p {
    color: var(--gray);
    font-size: 0.875rem;
}

/* Image Preview Grid */
.image-preview-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1rem;
}

.image-preview {
    position: relative;
    width: 120px;
    height: 120px;
    border-radius: var(--radius);
    overflow: hidden;
    border: 2px solid var(--border);
    background: var(--light);
}

.image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-preview .remove-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    background: var(--danger);
    color: var(--white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: var(--transition);
}

.image-preview .remove-btn:hover {
    background: var(--danger-dark);
    transform: scale(1.1);
}

.image-preview .upload-status {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.8);
    color: var(--white);
    font-size: 10px;
    text-align: center;
    padding: 4px;
    font-weight: 500;
}

/* Buttons */
.btn-success {
    background: linear-gradient(135deg, var(--success) 0%, var(--success-dark) 100%);
    color: var(--white);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

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

.btn-danger {
    background: linear-gradient(135deg, var(--danger) 0%, var(--danger-dark) 100%);
    color: var(--white);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
}

.btn-info {
    background: linear-gradient(135deg, var(--info) 0%, #2563eb 100%);
    color: var(--white);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning) 0%, #d97706 100%);
    color: var(--white);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--border);
    color: var(--dark);
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
}

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

/* Tabs */
.tabs {
    display: flex;
    gap: 0.5rem;
    border-bottom: 2px solid var(--border);
    margin-bottom: 1.75rem;
}

.tab-btn {
    background: none;
    border: none;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    cursor: pointer;
    color: var(--gray);
    transition: var(--transition);
    position: relative;
}

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

.tab-btn.active {
    color: var(--primary);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary);
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Category Grid */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.category-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--border);
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.category-card-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    background: var(--light);
}

.category-card-placeholder {
    width: 100%;
    height: 180px;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--secondary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-card-placeholder i {
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.7);
}

.category-card-body {
    padding: 1.25rem;
}

.category-card-title {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--dark);
}

.category-card-description {
    color: var(--gray);
    font-size: 0.875rem;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.category-card-actions {
    display: flex;
    gap: 0.5rem;
}

/* Products Grid (for All Products page) */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.product-grid-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--border);
}

.product-grid-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.product-grid-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    background: var(--light);
}

.product-grid-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
}

.product-grid-content {
    padding: 1rem;
}

.product-grid-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--dark);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-grid-category {
    font-size: 0.7rem;
    color: var(--gray);
    margin-bottom: 0.5rem;
}

.product-grid-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--success);
    margin-bottom: 0.5rem;
}

.product-grid-rating {
    font-size: 0.75rem;
    color: #fbbf24;
    margin-bottom: 0.5rem;
}

.product-grid-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
}

/* Filter Bar */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--light);
    border-radius: var(--radius);
    align-items: center;
}

.filter-bar .search-box {
    flex: 1;
    min-width: 200px;
}

.filter-bar .search-box input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.875rem;
    background: var(--white);
    color: var(--dark);
}

.filter-bar .filter-select {
    padding: 0.75rem 1rem;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    background: var(--white);
    color: var(--dark);
    font-size: 0.875rem;
    cursor: pointer;
}

.stat-badge {
    background: var(--primary-light);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
}

/* Product Item (List View) */
.product-item {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    transition: var(--transition);
}

.product-item:hover {
    box-shadow: var(--shadow-md);
}

.product-link {
    background: var(--light);
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-family: monospace;
    word-break: break-all;
    margin-top: 0.5rem;
}

.copy-link-btn {
    background: var(--info);
    color: var(--white);
    border: none;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.7rem;
    cursor: pointer;
    margin-left: 0.5rem;
    transition: var(--transition);
}

.copy-link-btn:hover {
    background: #2563eb;
}

/* Rich Text Editor */
.ql-container {
    font-size: 0.875rem;
    font-family: inherit;
    min-height: 200px;
}

.ql-toolbar {
    border-radius: var(--radius) var(--radius) 0 0;
    background: var(--light);
    border-color: var(--border) !important;
}

.ql-container {
    border-color: var(--border) !important;
    border-radius: 0 0 var(--radius) var(--radius);
}

.ql-editor {
    min-height: 200px;
    background: var(--white);
    color: var(--dark);
}

.ql-editor img {
    max-width: 100%;
    border-radius: var(--radius);
}

.ql-editor strong,
.ql-editor b {
    font-weight: bold !important;
}

.ql-editor em,
.ql-editor i {
    font-style: italic !important;
}

.ql-editor u {
    text-decoration: underline !important;
}

.ql-editor h1 {
    font-size: 1.5rem;
    font-weight: bold;
}

.ql-editor h2 {
    font-size: 1.25rem;
    font-weight: bold;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
    animation: fadeIn 0.2s ease;
}

.modal-content {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    max-width: 550px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
}

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

.modal-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--dark);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray);
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--danger);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

/* Spinner */
.spinner {
    width: 48px;
    height: 48px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 2rem auto;
}

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

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--dark);
    color: var(--white);
    padding: 0.875rem 1.5rem;
    border-radius: var(--radius);
    z-index: 1100;
    animation: slideInRight 0.3s ease;
    box-shadow: var(--shadow-lg);
    font-size: 0.875rem;
    font-weight: 500;
}

.toast.success {
    background: var(--success);
}

.toast.error {
    background: var(--danger);
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Empty States */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--gray);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state p {
    margin-bottom: 1rem;
}

/* Export Buttons */
.export-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.export-btn-json {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.export-btn-excel {
    background: linear-gradient(135deg, #10b981, #059669);
}

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .sidebar-close {
        display: block;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .category-grid {
        grid-template-columns: 1fr;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .top-bar {
        padding: 0.875rem 1rem;
    }
    
    .content-area {
        padding: 1rem;
    }
    
    .section-card {
        padding: 1rem;
    }
    
    .image-preview {
        width: 90px;
        height: 90px;
    }
    
    .price-input-group {
        flex-direction: column;
    }
    
    .currency-select {
        width: 100% !important;
    }
    
    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* Loading Button State */
.btn-loading {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
}

.btn-loading i {
    animation: spin 0.8s linear infinite;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--light);
    border-radius: 10px;
}

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

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