/**
 * Jodhur Seller App - Global Design System
 * 🏆 Premium Aesthetics & Responsive Utilities
 */

/* 1. Base Styles & Modern Typography */
:root {
    --brand-primary: #51826c;
    --brand-hover: #456d5b;
    --brand-light: rgba(81, 130, 108, 0.1);
    --accent-primary: #9a4915;
    --bg-main: #f6f7f6;
    --surface: #ffffff;
    --text-main: #1f2a26;
    --text-muted: #6c7a73;
    --border-color: rgba(31, 42, 38, 0.12);
    --shadow-premium: 0 8px 30px rgba(0, 0, 0, 0.06);
}

body {
    background-color: var(--bg-main);
    background-image:
        radial-gradient(circle at 10% 20%, rgba(81, 130, 108, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(154, 73, 21, 0.04) 0%, transparent 40%),
        linear-gradient(135deg, #f6f7f6 0%, #edf0ed 100%);
    background-attachment: fixed;
    font-family: 'DM Sans', 'Noto Sans Arabic', sans-serif;
    color: var(--text-main);
    min-height: 100vh;
    padding-bottom: 100px;
    /* Space for bottom navigation */
    -webkit-tap-highlight-color: transparent;
    -webkit-font-smoothing: antialiased;
}

/* 2. Advanced Animations */
.fade-in-up {
    animation: fadeInUp 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    opacity: 0;
    transform: translateY(20px);
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-pulse-slow {
    animation: pulse-slow 2.5s infinite;
}

@keyframes pulse-slow {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.8;
    }
}

.delay-1 {
    animation-delay: 0.1s;
}

.delay-2 {
    animation-delay: 0.2s;
}

.delay-3 {
    animation-delay: 0.3s;
}

.delay-4 {
    animation-delay: 0.4s;
}

/* 3. Specialized Layouts */
.product-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

@media (max-width: 480px) {
    .product-grid {
        gap: 0.875rem;
    }
}

/* 4. UI Component Polishing */
.card-premium {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    box-shadow: var(--shadow-premium);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-premium:active {
    transform: scale(0.98);
}

.btn-brand {
    background-color: var(--brand-primary);
    color: white;
    border-radius: 16px;
    font-weight: 700;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(81, 130, 108, 0.2);
}

.btn-brand:hover {
    background-color: var(--brand-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(81, 130, 108, 0.3);
}

/* 5. Utility Classes */
.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

[dir="rtl"] .fa-chevron-right,
[dir="rtl"] .fa-arrow-left,
[dir="rtl"] .fa-chevron-left {
    transform: scaleX(-1);
}

/* Smooth glass effect for headers */
header.backdrop-blur-sm {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* Responsive fixes for safe areas */
.pb-safe {
    padding-bottom: env(safe-area-inset-bottom);
}

/* 6. Decoration Utilities */
.zelij-bg {
    position: relative !important;
    overflow: hidden !important;
}

.zelij-bg::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("img/zelij.png");
    background-size: cover;
    background-repeat: no-repeat;
    background-position: right;
    opacity: 0.7;
    pointer-events: none;
    z-index: 0;
}

.zelij-bg>* {
    position: relative;
    z-index: 1;
}

/* 7. Admin Dashboard Scoped Styles */
.admin-dashboard {
    background: #f1f5f9;
    padding-bottom: 0 !important;
}

.admin-sidebar {
    width: 260px;
    background: #1e293b;
    color: #f1f5f9;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 1000;
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.admin-sidebar .sidebar-logo {
    padding: 2rem 1.5rem;
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.5px;
}

.admin-sidebar-nav {
    flex: 1;
    padding: 0 0.75rem;
}

.admin-nav-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.875rem 1rem;
    color: rgba(241, 245, 249, 0.7);
    text-decoration: none !important;
    transition: all 0.2s ease;
    border-radius: 12px;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.admin-nav-link:hover,
.admin-nav-link.active {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.admin-nav-link i {
    width: 20px;
    font-size: 1.1rem;
}

.admin-main {
    margin-left: 260px;
    padding: 2rem;
    min-height: 100vh;
    width: calc(100% - 260px);
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.admin-sidebar-toggle {
    display: none;
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 1100;
    background: #2563eb;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.3);
    border: none;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

@media (max-width: 1024px) {
    .admin-sidebar {
        transform: translateX(-100%);
    }

    .admin-sidebar.open {
        transform: translateX(0);
    }

    .admin-main {
        margin-left: 0;
        padding: 1.5rem;
        width: 100%;
    }

    .admin-sidebar-toggle {
        display: flex;
    }
}

.admin-stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 20px;
    border: 1px solid rgba(31, 42, 38, 0.08);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
}

.admin-table-container {
    background: white;
    border-radius: 20px;
    border: 1px solid rgba(31, 42, 38, 0.08);
    overflow: hidden;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th {
    background: #f8fafc;
    padding: 1rem;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #64748b;
    border-bottom: 1px solid #e2e8f0;
}

.admin-table td {
    padding: 1rem;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.875rem;
}