@font-face {
    font-family: 'Vazirmatn';
    src: url('fonts/Vazirmatn-Regular.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Vazirmatn';
    src: url('fonts/Vazirmatn-Bold.woff2') format('woff2');
    font-weight: bold;
    font-style: normal;
}

:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --primary-light: rgba(99, 102, 241, 0.1);
    --secondary: #ec4899;
    --slate-50: #f8fafc;
    --slate-100: #f1f5f9;
    --slate-200: #e2e8f0;
    --slate-300: #cbd5e1;
    --slate-400: #94a3b8;
    --slate-500: #64748b;
    --slate-600: #475569;
    --slate-700: #334155;
    --slate-800: #1e293b;
    --slate-900: #0f172a;
    --bg-main: #fcfdfe;
    --card-bg: rgba(255, 255, 255, 0.85);
    --glass-bg: rgba(255, 255, 255, 0.7);
    --border: rgba(226, 232, 240, 0.5);
    --text-main: #0f172a;
    --text-muted: #64748b;
    --success: #10b981;
    --danger: #f43f5e;
    --warning: #f59e0b;
    --radius-lg: 1.5rem;
    --radius-xl: 2.5rem;
    --radius-2xl: 3.5rem;
    --shadow-premium: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    --shadow-glass: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; outline: none !important; }

body { 
    background-color: var(--bg-main); 
    color: var(--text-main); 
    font-family: 'Vazirmatn', sans-serif; 
    line-height: 1.8;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    direction: rtl;
    text-align: right;
}

.container { max-width: 1440px; margin: 0 auto; padding: 0 2rem; }
.flex { display: flex; align-items: center; gap: 12px; }
.flex-col { flex-direction: column; }
.flex-1 { flex: 1; }
.flex-wrap { flex-wrap: wrap; }
.between { justify-content: space-between; }
.justify-center { justify-content: center; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-12 { gap: 3rem; }

.w-full { width: 100%; }
.w-12 { width: 3rem; } .h-12 { height: 3rem; }
.aspect-square { aspect-ratio: 1 / 1; }

.bg-white { background-color: #fff; }
.bg-slate-50 { background-color: var(--slate-50); }
.bg-slate-100 { background-color: var(--slate-100); }
.bg-primary { background-color: var(--primary) !important; }
.text-white { color: #fff !important; }
.text-slate-400 { color: var(--slate-400); }
.text-slate-500 { color: var(--slate-500); }
.text-slate-600 { color: var(--slate-600); }
.text-slate-800 { color: var(--slate-800); }

.rounded-xl { border-radius: 1rem; }
.rounded-2xl { border-radius: 1.5rem; }
.rounded-3xl { border-radius: 2rem; }
.rounded-full { border-radius: 9999px; }

.font-black { font-weight: 900; }
.font-bold { font-weight: 700; }
.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }
.text-lg { font-size: 1.125rem; }
.text-2xl { font-size: 1.5rem; }

.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-10 { margin-bottom: 2.5rem; }

.shadow-lg { box-shadow: var(--shadow-lg); }
.shadow-2xl { box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); }

.absolute { position: absolute; }
.relative { position: relative; }
.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }

.overflow-hidden { overflow: hidden; }
.object-cover { object-fit: cover; }

.transition-all { transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); }

.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-5 { padding-top: 1.25rem; padding-bottom: 1.25rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }

/* Grid Systems */
.grid { display: grid; }
.navbar { 
    background: #fff; 
    border-bottom: 1px solid var(--border); 
    padding: 1.25rem 0; 
    position: sticky; 
    top: 0; 
    z-index: 1000; 
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.grid-responsive { 
    display: grid; 
    gap: 2rem; 
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); 
}
@media (max-width: 640px) {
    .grid-responsive { grid-template-columns: 1fr; }
    .container { padding: 0 1.25rem; }
}

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

@media (max-width: 1024px) { 
    .grid-4 { grid-template-columns: repeat(2, 1fr); } 
}
@media (max-width: 768px) { 
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; gap: 1.5rem; } 
}

.max-w-5xl { max-width: 1024px; }
.mx-auto { margin-left: auto; margin-right: auto; }

.bento-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; }
.bento-col-2 { grid-column: span 2; }
.bento-row-2 { grid-row: span 2; }

@media (max-width: 1200px) {
    .bento-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
    .bento-grid { grid-template-columns: 1fr; }
    .bento-col-2 { grid-column: span 1; }
}

.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }
.shadow-inner { box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.05); }

.premium-card {
    background: white;
    border-radius: 2.5rem;
    border: 1px solid rgba(226, 232, 240, 0.6);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.03), 0 10px 10px -5px rgba(0, 0, 0, 0.02);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.premium-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 30px 40px -10px rgba(0, 0, 0, 0.08);
}

.stat-v3 {
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 180px;
}

.tracking-widest { letter-spacing: 0.1em; }
.leading-relaxed { line-height: 1.625; }

.plat-tab.active { background-color: var(--primary) !important; color: white !important; }
.plat-tab:hover:not(.active) { background-color: var(--slate-200); }

.manual-modal-content {
    background: white;
    padding: 3rem;
    border-radius: 3.5rem;
    width: 95%;
    max-width: 1100px;
    max-height: 95vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 50px 100px -20px rgba(0, 0, 0, 0.3);
}

@media (max-width: 640px) {
    .manual-modal-content { padding: 1.5rem; border-radius: 2rem; }
}

.bg-primary { background-color: var(--primary); }
.bg-secondary { background-color: var(--secondary); }
.bg-success { background-color: var(--success); }
.bg-danger { background-color: var(--danger); }
.bg-warning { background-color: var(--warning); }
.bg-slate-50 { background-color: var(--slate-50); }

/* Bento Grid Dashboard */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: auto;
    gap: 1.5rem;
}
.bento-row-2 { grid-row: span 2; }
.bento-col-2 { grid-column: span 2; }
@media (max-width: 1024px) {
    .bento-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
    .bento-grid { grid-template-columns: 1fr; }
    .bento-col-2 { grid-column: span 1; }
}

/* Glass & Card Refinement */
.card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    z-index: 1;
}
.card:hover { 
    transform: translateY(-8px) scale(1.01); 
    box-shadow: var(--shadow-xl); 
    border-color: rgba(99, 102, 241, 0.2); 
    z-index: 10;
}
.card-body { padding: 2.5rem; }

/* Dashboard Mini Cards */
.stat-card {
    background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%);
    border: 1px solid var(--border);
    padding: 1.5rem 2rem;
    border-radius: 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}
.stat-icon {
    width: 4rem;
    height: 4rem;
    border-radius: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.75rem;
    border-radius: 1.25rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    font-size: 0.875rem;
    gap: 10px;
    text-decoration: none;
}
.btn-primary { 
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%); 
    color: white; 
    box-shadow: 0 10px 20px -5px rgba(99, 102, 241, 0.3);
}
.btn-primary:hover { 
    transform: translateY(-2px) scale(1.02); 
    box-shadow: 0 15px 30px -10px rgba(99, 102, 241, 0.4);
}
.btn-outline { 
    background: white; 
    border: 1px solid var(--slate-200); 
    color: var(--slate-700); 
}
.btn-outline:hover { 
    background: var(--primary-light); 
    border-color: var(--primary); 
    color: var(--primary); 
}
.btn-danger { background: var(--danger); color: white; box-shadow: 0 5px 15px -3px rgba(244, 63, 94, 0.3); }

/* Status Pill Modern */
.status-pill {
    padding: 0.4rem 1.25rem;
    border-radius: 9999px;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.status-pill::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

/* Admin Sidebar Refinement */
.admin-layout { display: flex; min-height: 100vh; }
.admin-sidebar { 
    width: 300px; 
    background: #fff;
    border-left: 1px solid var(--border);
    padding: 3rem 1.5rem;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
}
.admin-sidebar::-webkit-scrollbar {
    width: 4px;
}
.admin-sidebar::-webkit-scrollbar-track {
    background: transparent;
}
.admin-sidebar::-webkit-scrollbar-thumb {
    background: #e2e8f0;
    border-radius: 4px;
}
.admin-content { 
    flex: 1; 
    padding: 4rem 5rem; 
    background: #f8fafc;
    min-width: 0;
}
@media (max-width: 1280px) { .admin-content { padding: 3rem 2.5rem; } }

.nav-btn {
    padding: 1rem 1.5rem;
    margin-bottom: 0.5rem;
    border-radius: 1.25rem;
    color: var(--slate-500);
    transition: all 0.3s;
    font-size: 0.9rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
}
.nav-btn:hover { background: var(--slate-50); color: var(--primary); padding-right: 2rem; }
.nav-btn.active { 
    background: var(--primary); 
    color: #fff; 
    box-shadow: 0 15px 25px -5px rgba(99, 102, 241, 0.2);
}

/* Glass Form Fields */
.input, .select, .textarea {
    width: 100%;
    padding: 1rem 1.25rem;
    border-radius: 1rem;
    border: 1px solid var(--slate-200);
    background: #fff;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s;
}
.input:focus { border-color: var(--primary); box-shadow: 0 10px 20px -10px rgba(99, 102, 241, 0.15); }

/* Badges Premium */
.badge {
    padding: 0.4rem 1rem;
    border-radius: 99px;
    font-size: 11px;
    font-weight: 800;
    display: inline-flex;
}

/* Animations */
.animate-float { animation: float 6s ease-in-out infinite; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* Shadows */
.shadow-premium { box-shadow: 0 20px 40px -15px rgba(0,0,0,0.05); }

/* Portal Specific Layouts */
.portal-hero {
    background: linear-gradient(135deg, var(--slate-900) 0%, var(--slate-800) 100%);
    padding: 6rem 0;
    border-radius: var(--radius-xl);
    text-align: center;
    margin-bottom: 4rem;
}
.portal-hero h1 { font-size: 3.5rem; color: #fff; line-height: 1.2; }

/* Responsive adjustments */
@media (max-width: 1024px) {
    .admin-layout { flex-direction: column; }
    .admin-sidebar { width: 100%; height: auto; position: relative; border-left: 0; border-bottom: 1px solid var(--border); }
    .admin-content { padding: 2rem 1.5rem; }
    .portal-hero h1 { font-size: 2.5rem; }
}

/* Persian Price Format */
.price-chip {
    background: var(--primary-light);
    color: var(--primary);
    padding: 0.6rem 1.25rem;
    border-radius: 1.25rem;
    font-weight: 900;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
}

/* Shared Utils & Tailwind-like Helpers */
.flex-1 { flex: 1; }
.w-8 { width: 2rem; } .h-8 { height: 2rem; }
.w-10 { width: 2.5rem; } .h-10 { height: 2.5rem; }
.w-12 { width: 3rem; } .h-12 { height: 3rem; }
.w-16 { width: 4rem; } .h-16 { height: 4rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.p-10 { padding: 2.5rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-5 { padding-left: 1.25rem; padding-right: 1.25rem; }
.px-8 { padding-left: 2rem; padding-right: 2rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-6 { margin-bottom: 1.5rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 1rem; }
.rounded-2xl { border-radius: 1.5rem; }
.rounded-full { border-radius: 9999px; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }
.font-medium { font-weight: 500; }
.font-bold { font-weight: 700; }
.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-lg { box-shadow: var(--shadow-lg); }
/* Instagram-inspired Styling Utilities */
.ig-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2px;
}
@media (min-width: 768px) {
    .ig-grid { 
        grid-template-columns: repeat(4, 1fr);
        gap: 1rem; 
    }
}
@media (max-width: 1024px) {
    .ig-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 640px) {
    .ig-grid { grid-template-columns: repeat(2, 1fr); gap: 4px; }
}

.ig-post-card {
    background: #fff;
    border: 1px solid var(--slate-100);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 2rem;
}
@media (max-width: 640px) {
    .ig-post-card { border-radius: 0; border-left: none; border-right: none; }
}

.ig-post-header {
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.ig-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    padding: 2px;
}
.ig-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
}

.ig-media {
    position: relative;
    aspect-ratio: 1/1.25;
    background: #fafafa;
}
.ig-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ig-actions {
    padding: 12px 16px;
    display: flex;
    gap: 16px;
}
.ig-action-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: transform 0.2s;
}
.ig-action-btn:active { transform: scale(1.1); }

.ig-caption {
    padding: 0 16px 12px;
    font-size: 0.85rem;
}

/* Sharing Buttons */
.share-bar {
    display: flex;
    gap: 10px;
    padding: 10px 16px;
    border-top: 1px solid var(--slate-50);
}
.share-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.3s;
}
.share-btn.bale { background: #23b761; color: white; }
.share-btn.rubika { background: #92278f; color: white; }
.share-btn.instagram { background: #e1306c; color: white; }
.share-btn.telegram { background: #0088cc; color: white; }
.share-btn:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.1); }

/* Carousel Refinement */
.review-carousel-container {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    padding: 4rem 1.5rem;
    border-radius: 3rem;
    color: white;
}
@media (max-width: 640px) {
    .review-carousel-container { border-radius: 0; }
}

.review-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 2rem;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s;
}
.review-card.active { border-color: var(--primary); }

.review-img {
    width: 200px !important;
    aspect-ratio: 1/1.25;
    object-fit: cover;
    border-radius: 1.5rem;
    margin: 0 auto 1.5rem;
    box-shadow: 0 15px 30px rgba(0,0,0,0.3);
}

.review-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 1.5rem;
}
.vote-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
}
.vote-btn.approve { background: #10b981; color: white; box-shadow: 0 10px 20px rgba(16, 185, 129, 0.3); }
.vote-btn.reject { background: #f43f5e; color: white; box-shadow: 0 10px 20px rgba(244, 63, 94, 0.3); }
.vote-btn:hover { transform: scale(1.1); }

/* Owl Carousel Custom */
.owl-theme .owl-dots .owl-dot span {
    width: 8px;
    height: 8px;
    background: #d1d5db;
    transition: all 0.3s;
}
.owl-theme .owl-dots .owl-dot.active span {
    background: var(--primary);
    width: 24px;
}
