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


@font-face {
font-family: Estedad-Medium;
font-style: normal;
font-weight: normal;
src: url("../fonts/Estedad-Medium.woff2") format("woff2");
}

/* --- CSS Custom Properties (Design Tokens) --- */
:root {
  /* Brand Colors */
  --color-primary: #1a1a1a;
  --color-primary-light: #2d2d2d;
  --color-primary-dark: #000000;
  --color-secondary: #c9a84c;
  --color-secondary-light: #d4b96a;
  --color-secondary-dark: #a88a3a;
  --color-accent: #b85c38;
  --color-accent-light: #c97a5a;
  --color-accent-dark: #9e4a2e;

  /* Neutrals */
  --color-white: #ffffff;
  --color-ivory: #faf8f5;
  --color-off-white: #f5f2ed;
  --color-cream: #efe9e0;
  --color-beige: #e8e0d4;
  --color-muted-beige: #d9cfc2;
  --color-light-gray: #c4bdb3;
  --color-soft-gray: #8a8378;
  --color-medium-gray: #6b6560;
  --color-dark-gray: #4a4540;
  --color-charcoal: #2c2926;
  --color-deep-black: #111111;

  /* Semantic Colors */
  --color-success: #4a8c5c;
  --color-success-light: #e8f5ec;
  --color-warning: #c4943a;
  --color-warning-light: #fef8ec;
  --color-error: #c44a4a;
  --color-error-light: #fce8e8;
  --color-info: #4a7ab8;
  --color-info-light: #e8f0fa;

  /* Backgrounds */
  --bg-primary: #ffffff;
  --bg-secondary: #faf8f5;
  --bg-tertiary: #f5f2ed;
  --bg-card: #ffffff;
  --bg-overlay: rgba(0, 0, 0, 0.5);
  --bg-glass: rgba(255, 255, 255, 0.85);

  /* Text Colors */
  --text-primary: #1a1a1a;
  --text-secondary: #6b6560;
  --text-tertiary: #8a8378;
  --text-muted: #a39d95;
  --text-inverse: #ffffff;
  --text-gold: #c9a84c;
  --text-link: #4a7ab8;

  /* Border Colors */
  --border-light: #e8e0d4;
  --border-default: #d9cfc2;
  --border-dark: #c4bdb3;

  /* Typography */
  --font-heading: 'Estedad-Bold';
  --font-body: 'Estedad-Medium';
  --font-en: 'Inter', 'Helvetica Neue', sans-serif;
  --font-mono: 'Fira Code', monospace;

  /* Font Sizes */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-md: 1.125rem;
  --text-lg: 1.25rem;
  --text-xl: 1.5rem;
  --text-2xl: 1.875rem;
  --text-3xl: 2.25rem;
  --text-4xl: 3rem;
  --text-5xl: 3.75rem;

  /* Font Weights */
  --font-light: 300;
  --font-regular: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;
  --font-extrabold: 800;

  /* Line Heights */
  --leading-tight: 1.25;
  --leading-normal: 1.6;
  --leading-relaxed: 1.8;
  --leading-loose: 2;

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 24px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.05), 0 2px 4px rgba(0, 0, 0, 0.03);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.06), 0 4px 6px rgba(0, 0, 0, 0.03);
  --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.08), 0 10px 10px rgba(0, 0, 0, 0.03);
  --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-card-hover: 0 8px 24px rgba(0, 0, 0, 0.1);
  --shadow-dropdown: 0 10px 30px rgba(0, 0, 0, 0.12);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;
  --transition-slower: 600ms ease;

  /* Z-Index Scale */
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-fixed: 300;
  --z-modal-backdrop: 400;
  --z-modal: 500;
  --z-popover: 600;
  --z-tooltip: 700;
  --z-toast: 800;

  /* Layout */
  --header-height: 72px;
  --header-height-scrolled: 60px;
  --sidebar-width: 280px;
  --container-max: 1320px;
  --container-narrow: 960px;
  --bottom-nav-height: 64px;
}

/* --- Dark Mode Tokens --- */
[data-theme="dark"] {
  --color-primary: #f5f2ed;
  --color-primary-light: #e8e0d4;
  --color-primary-dark: #faf8f5;
  --color-secondary: #d4b96a;
  --color-secondary-light: #e0ca82;
  --color-secondary-dark: #c9a84c;

  --bg-primary: #111111;
  --bg-secondary: #1a1a1a;
  --bg-tertiary: #222222;
  --bg-card: #1e1e1e;
  --bg-overlay: rgba(0, 0, 0, 0.7);
  --bg-glass: rgba(17, 17, 17, 0.85);

  --text-primary: #f5f2ed;
  --text-secondary: #c4bdb3;
  --text-tertiary: #8a8378;
  --text-muted: #6b6560;
  --text-inverse: #111111;
  --text-link: #6a9fd8;

  --border-light: #2c2926;
  --border-default: #3a3632;
  --border-dark: #4a4540;

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.3);
  --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.4);
  --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-card-hover: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-dropdown: 0 10px 30px rgba(0, 0, 0, 0.5);

  --color-success-light: #1a2e20;
  --color-warning-light: #2e2510;
  --color-error-light: #2e1a1a;
  --color-info-light: #1a2030;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--font-regular);
  line-height: var(--leading-normal);
  color: var(--text-primary);
  background-color: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  min-height: 100vh;
}

/* RTL Support */
[dir="rtl"] body {
  text-align: right;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: var(--font-bold);
  line-height: var(--leading-tight);
  color: var(--text-primary);
  margin-bottom: var(--space-4);
}

h1 { font-size: var(--text-4xl); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }
h6 { font-size: var(--text-md); }

p {
  margin-bottom: var(--space-4);
  color: var(--text-secondary);
}

a {
  color: var(--text-link);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-secondary-dark);
}

/* --- Scrollbar (Golden / برند نگارین) --- */

/* Webkit (Chrome, Edge, Safari, Opera) */
::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(
    180deg,
    var(--color-secondary-light) 0%,
    var(--color-secondary) 50%,
    var(--color-secondary-dark) 100%
  );
  border-radius: var(--radius-full);
  border: 2px solid var(--bg-secondary);
  transition: background var(--transition-base);
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(
    180deg,
    var(--color-secondary) 0%,
    var(--color-secondary-dark) 100%
  );
}

::-webkit-scrollbar-thumb:active {
  background: linear-gradient(
    180deg,
    var(--color-secondary-dark) 0%,
    #8a6f28 100%
  );
}

::-webkit-scrollbar-corner {
  background: var(--bg-secondary);
}

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--color-secondary) var(--bg-secondary);
}

/* Horizontal scrollbar (اگه جایی اسکرول افقی داشت) */
::-webkit-scrollbar-thumb:horizontal {
  background: linear-gradient(
    90deg,
    var(--color-secondary-light) 0%,
    var(--color-secondary) 50%,
    var(--color-secondary-dark) 100%
  );
}


.text-gold { color: var(--color-secondary) !important; }
.text-muted { color: var(--text-tertiary) !important; }
.text-accent { color: var(--color-accent) !important; }
.text-en { font-family: var(--font-en); direction: ltr; display: inline-block; }

/* --- Layout Utilities --- */
.container-negarin {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-6);
}

.container-narrow {
  max-width: var(--container-narrow);
  margin-inline: auto;
  padding-inline: var(--space-6);
}

.section-padding {
  padding-top: var(--space-20);
  padding-bottom: var(--space-20);
}

.section-padding-sm {
  padding-top: var(--space-12);
  padding-bottom: var(--space-12);
}

/* --- Section Header --- */
.section-header {
  margin-bottom: var(--space-12);
}

.section-header h2 {
  font-size: var(--text-2xl);
  font-weight: var(--font-bold);
  margin-bottom: var(--space-2);
}

.section-header p {
  color: var(--text-tertiary);
  font-size: var(--text-md);
  margin-bottom: 0;
}

.section-header .section-link {
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--color-secondary);
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 5px 12px;
  border-radius: 1rem;
  background-color: var(--color-primary);
}

.section-header .section-link:hover {
  color: var(--color-secondary-dark);
}

/* --- Buttons --- */
.btn-negarin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.625rem 1.5rem;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  line-height: 1.5;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-base);
  white-space: nowrap;
  text-decoration: none;
}

.btn-negarin:focus-visible {
  outline: 2px solid var(--color-secondary);
  outline-offset: 2px;
}

.btn-primary-negarin {
  background-color: var(--color-primary);
  color: var(--text-inverse);
  border-color: var(--color-primary);
}

.btn-primary-negarin:hover {
  background-color: var(--color-primary-light);
  border-color: var(--color-primary-light);
  color: var(--text-inverse);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-gold {
  background-color: var(--color-secondary);
  color: var(--color-deep-black);
  border-color: var(--color-secondary);
}

.btn-gold:hover {
  background-color: var(--color-secondary-dark);
  border-color: var(--color-secondary-dark);
  color: var(--color-deep-black);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-outline-negarin {
  background-color: transparent;
  color: var(--text-primary);
  border-color: var(--border-default);
}

.btn-outline-negarin:hover {
  background-color: var(--color-primary);
  color: var(--text-inverse);
  border-color: var(--color-primary);
}

.btn-ghost {
  background-color: transparent;
  color: var(--text-secondary);
  border-color: transparent;
}

.btn-ghost:hover {
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
}

.btn-sm { padding: 0.375rem 1rem; font-size: var(--text-xs); }
.btn-lg { padding: 0.875rem 2rem; font-size: var(--text-base); }
.btn-icon { padding: 0.5rem; width: 40px; height: 40px; }
.btn-icon.btn-sm { width: 32px; height: 32px; padding: 0.25rem; }

/* --- Cards Base --- */
.card-negarin {
  background-color: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-base);
}

.card-negarin:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px);
  border-color: var(--border-default);
}

/* --- Badge --- */
.badge-negarin {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  font-size: var(--text-xs);
  font-weight: var(--font-medium);
  border-radius: var(--radius-full);
  background-color: var(--bg-tertiary);
  color: var(--text-secondary);
}

.badge-gold {
  background-color: var(--color-secondary);
  color: var(--color-deep-black);
}

.badge-accent {
  background-color: var(--color-accent);
  color: white;
}

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

/* Verified Badge */
.verified-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  background-color: var(--color-info);
  color: white;
  border-radius: var(--radius-full);
  font-size: 10px;
}

/* --- Images --- */
.img-negarin {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.img-placeholder {
  background-color: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

/* --- Overlay --- */
.overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.6) 0%, transparent 60%);
  z-index: 1;
}

.overlay-dark {
  background: rgba(0, 0, 0, 0.5);
}

/* --- Skeleton Loading --- */
.skeleton {
  background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--bg-secondary) 50%, var(--bg-tertiary) 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: var(--radius-sm);
}

@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-text { height: 16px; margin-bottom: 8px; }
.skeleton-text-sm { height: 12px; width: 60%; }
.skeleton-title { height: 24px; width: 80%; margin-bottom: 12px; }
.skeleton-avatar { width: 48px; height: 48px; border-radius: var(--radius-full); }
.skeleton-image { width: 100%; padding-bottom: 100%; }
.skeleton-card { height: 320px; border-radius: var(--radius-lg); }

/* --- Toast --- */
.toast-negarin {
  position: fixed;
  bottom: var(--space-6);
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background-color: var(--color-charcoal);
  color: var(--text-inverse);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-lg);
  font-size: var(--text-sm);
  z-index: var(--z-toast);
  opacity: 0;
  transition: all var(--transition-base);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  box-shadow: var(--shadow-xl);
}

.toast-negarin.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.toast-negarin.success { background-color: var(--color-success); }
.toast-negarin.error { background-color: var(--color-error); }
.toast-negarin.warning { background-color: var(--color-warning); }

/* --- Empty State --- */
.empty-state {
  text-align: center;
  padding: var(--space-16) var(--space-8);
}

.empty-state .empty-icon {
  font-size: 3rem;
  color: var(--text-muted);
  margin-bottom: var(--space-6);
}

.empty-state h3 {
  font-size: var(--text-lg);
  font-weight: var(--font-semibold);
  margin-bottom: var(--space-2);
}

.empty-state p {
  color: var(--text-tertiary);
  font-size: var(--text-sm);
}

/* --- Breadcrumb --- */
.breadcrumb-negarin {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  list-style: none;
  padding: var(--space-4) 0;
  margin: 0;
  font-size: var(--text-sm);
}

.breadcrumb-negarin li {
  color: var(--text-tertiary);
}

.breadcrumb-negarin li a {
  color: var(--text-secondary);
}

.breadcrumb-negarin li a:hover {
  color: var(--color-secondary);
}

.breadcrumb-negarin li.active {
  color: var(--text-primary);
  font-weight: var(--font-medium);
}

.breadcrumb-negarin .separator {
  color: var(--text-muted);
  font-size: var(--text-xs);
}

/* --- Rating Stars --- */
.rating-stars {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: var(--color-secondary);
  font-size: var(--text-sm);
}

.rating-stars .bi-star-fill { color: var(--color-secondary); }
.rating-stars .bi-star { color: var(--border-default); }
.rating-stars .bi-star-half { color: var(--color-secondary); }

.rating-value {
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--text-secondary);
  margin-inline-start: var(--space-1);
}

/* --- Price --- */
.price {
  font-weight: var(--font-bold);
  color: var(--text-primary);
}

.price-old {
  text-decoration: line-through;
  color: var(--text-muted);
  font-weight: var(--font-regular);
  font-size: var(--text-sm);
}

.price-currency {
  font-size: var(--text-xs);
  font-weight: var(--font-regular);
  color: var(--text-tertiary);
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--border-dark);
  border-radius: 3px;
}

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

/* --- Selection --- */
::selection {
  background-color: var(--color-secondary);
  color: var(--color-deep-black);
}

/* --- Focus Visible --- */
:focus-visible {
  outline: 2px solid var(--color-secondary);
  outline-offset: 2px;
}

/* --- Page Transition --- */
.page-content {
  padding-top: var(--header-height);
  min-height: 100vh;
}

/* --- Animations --- */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

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

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

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-30px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.animate-fade-in { animation: fadeIn var(--transition-slow) ease forwards; }
.animate-fade-in-up { animation: fadeInUp var(--transition-slow) ease forwards; }
.animate-fade-in-down { animation: fadeInDown var(--transition-slow) ease forwards; }
.animate-scale-in { animation: scaleIn var(--transition-base) ease forwards; }

/* Staggered animations */
.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }
.stagger-5 { animation-delay: 0.5s; }
.stagger-6 { animation-delay: 0.6s; }

/* --- Utility Classes --- */
.bg-ivory { background-color: var(--color-ivory) !important; }
.bg-charcoal { background-color: var(--color-charcoal) !important; }
.bg-deep-black { background-color: var(--color-deep-black) !important; }

.border-negarin { border-color: var(--border-light) !important; }

.overflow-hidden { overflow: hidden; }

.truncate-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.truncate-1 {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* --- Divider --- */
.divider {
  height: 1px;
  background-color: var(--border-light);
  border: none;
  margin: var(--space-8) 0;
}

/* --- Dark Mode Toggle --- */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.theme-toggle:hover {
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
}

/* --- Mobile Bottom Navigation --- */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--bottom-nav-height);
  background-color: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-light);
  z-index: var(--z-fixed);
  padding: var(--space-2) 0;
}

.bottom-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-around;
  height: 100%;
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: 10px;
  color: var(--text-tertiary);
  text-decoration: none;
  padding: var(--space-1) var(--space-3);
  transition: color var(--transition-fast);
}

.bottom-nav-item i {
  font-size: 1.25rem;
}

.bottom-nav-item.active,
.bottom-nav-item:hover {
  color: var(--color-secondary);
}

/* --- Tooltip --- */
.tooltip-negarin {
  position: relative;
}

.tooltip-negarin::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.25rem 0.5rem;
  background-color: var(--color-charcoal);
  color: white;
  font-size: var(--text-xs);
  border-radius: var(--radius-sm);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-fast);
}

.tooltip-negarin:hover::after {
  opacity: 1;
}

/* --- Back to Top --- */
.back-to-top {
  position: fixed;
  bottom: calc(var(--bottom-nav-height, 0px) + var(--space-6));
  left: var(--space-6);
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background-color: var(--color-primary);
  color: var(--text-inverse);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
  z-index: var(--z-sticky);
  box-shadow: var(--shadow-lg);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background-color: var(--color-secondary);
  color: var(--color-deep-black);
  transform: translateY(-2px);
}

/* --- Lazy Load Image --- */
.lazy-img {
  opacity: 0;
  transition: opacity var(--transition-slow);
}

.lazy-img.loaded {
  opacity: 1;
}

/* --- Status Indicators --- */
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  display: inline-block;
}

.status-dot.online { background-color: var(--color-success); }
.status-dot.offline { background-color: var(--text-muted); }
.status-dot.busy { background-color: var(--color-error); }

/* --- Count Badge --- */
.count-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  border-radius: var(--radius-full);
  background-color: var(--color-accent);
  color: white;
  font-size: 10px;
  font-weight: var(--font-bold);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  line-height: 1;
}

/* --- KPI Card --- */
.kpi-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  transition: all var(--transition-base);
}

.kpi-card:hover {
  box-shadow: var(--shadow-card);
}

.kpi-value {
  font-size: var(--text-3xl);
  font-weight: var(--font-bold);
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: var(--space-1);
}

.kpi-label {
  font-size: var(--text-sm);
  color: var(--text-tertiary);
}

.kpi-change {
  font-size: var(--text-xs);
  font-weight: var(--font-medium);
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.kpi-change.positive { color: var(--color-success); }
.kpi-change.negative { color: var(--color-error); }

/* --- Dashboard Layout --- */
.dashboard-layout {
  display: flex;
  min-height: 100vh;
}

.dashboard-sidebar {
  width: var(--sidebar-width);
  background-color: var(--bg-secondary);
  border-inline-start: 1px solid var(--border-light);
  position: fixed;
  top: 0;
  bottom: 0;
  overflow-y: auto;
  z-index: var(--z-sticky);
  padding: var(--space-6) 0;
  transition: transform var(--transition-base);
}

.dashboard-main {
  flex: 1;
  margin-inline-start: var(--sidebar-width);
  padding: var(--space-8);
  min-height: 100vh;
}

/* --- Page Header --- */
.page-header {
  margin-bottom: var(--space-8);
}

.page-header h1 {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-2);
}

.page-header p {
  color: var(--text-tertiary);
  margin-bottom: 0;
}

/* --- Tab Navigation --- */
.nav-tabs-negarin {
  display: flex;
  gap: var(--space-1);
  border-bottom: 1px solid var(--border-light);
  margin-bottom: var(--space-8);
  overflow-x: auto;
  scrollbar-width: none;
}

.nav-tabs-negarin::-webkit-scrollbar { display: none; }

.nav-tab-item {
  padding: var(--space-3) var(--space-5);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--text-tertiary);
  border: none;
  background: none;
  white-space: nowrap;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all var(--transition-fast);
}

.nav-tab-item:hover {
  color: var(--text-primary);
}

.nav-tab-item.active {
  color: var(--color-secondary);
  border-bottom-color: var(--color-secondary);
}

/* --- Filter Tags --- */
.filter-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.filter-tag {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 0.375rem 0.875rem;
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.filter-tag:hover,
.filter-tag.active {
  background-color: var(--color-primary);
  color: var(--text-inverse);
  border-color: var(--color-primary);
}

.filter-tag .bi-x {
  font-size: 10px;
  opacity: 0.7;
}

/* --- Print --- */
@media print {
  .no-print { display: none !important; }
  body { color: #000; background: #fff; }
}


    .unlocked-item{
        display:flex;
        align-items:center;
        gap:var(--space-4);
        padding:var(--space-5);
        background:var(--bg-card);
        border:1.5px solid var(--border-light);
        border-radius:var(--radius-xl);
        text-decoration:none;
        color:inherit;
        transition:all 0.3s ease;
        margin-bottom:var(--space-3);
    }
    .unlocked-item:hover{
        border-color:rgba(34,197,94,0.5);
        box-shadow:0 12px 24px -8px rgba(34,197,94,0.2);
        transform:translateY(-2px);
    }
    .unlocked-item-icon{
        width:56px;height:56px;
        border-radius:var(--radius-lg);
        background:linear-gradient(135deg,rgba(34,197,94,0.15),rgba(34,197,94,0.05));
        color:#16a34a;
        display:flex;align-items:center;justify-content:center;
        font-size:1.5rem;flex-shrink:0;
    }
    .unlocked-item-content{flex:1;min-width:0}
    .unlocked-item-content h4{font-size:var(--text-md);font-weight:bold;margin-bottom:4px;color:var(--text-primary)}
    .unlocked-item-content p{font-size:var(--text-xs);color:var(--text-tertiary);margin:0;line-height:1.6}
    .unlocked-item-cta{
        color:#16a34a;font-size:var(--text-xs);
        font-weight:bold;display:inline-flex;align-items:center;gap:4px;
        white-space:nowrap;
    }

    /* ==================== Locked Item ==================== */
    .locked-item{
        display:flex;
        align-items:center;
        gap:var(--space-4);
        padding:var(--space-5);
        background:var(--bg-card);
        border:1.5px dashed var(--border-light);
        border-radius:var(--radius-xl);
        cursor:pointer;
        transition:all 0.3s ease;
        margin-bottom:var(--space-3);
        position:relative;
        overflow:hidden;
        opacity:0.85;
    }
    .locked-item:hover{
        opacity:1;
        border-color:rgba(201,168,76,0.5);
        transform:translateY(-2px);
    }
    .locked-item-icon{
        width:56px;height:56px;
        border-radius:var(--radius-lg);
        background:var(--bg-secondary);
        color:var(--text-muted);
        display:flex;align-items:center;justify-content:center;
        font-size:1.5rem;flex-shrink:0;
        position:relative;
    }
    .locked-item-icon::after{
        content:'';
        position:absolute;
        inset:-2px;
        border-radius:var(--radius-lg);
        border:2px dashed rgba(201,168,76,0.3);
    }
    .locked-item-content{flex:1;min-width:0}
    .locked-item-content h4{
        font-size:var(--text-md);font-weight:bold;margin-bottom:4px;
        color:var(--text-secondary);
        display:flex;align-items:center;gap:6px;
    }
    .locked-item-content h4::after{
        content:'🔒';
        font-size:14px;
    }
    .locked-item-content p{font-size:var(--text-xs);color:var(--text-muted);margin:0;line-height:1.6}
    .locked-item-cta{
        display:inline-flex;align-items:center;gap:5px;
        padding:8px 14px;
        background:linear-gradient(135deg,var(--color-secondary),var(--color-secondary-dark));
        color:#fff;
        font-size:11px;font-weight:bold;
        border-radius:100px;
        box-shadow:0 4px 12px rgba(201,168,76,0.3);
        white-space:nowrap;
        transition:all 0.3s ease;
    }
    .locked-item:hover .locked-item-cta{
        transform:scale(1.05);
        box-shadow:0 6px 16px rgba(201,168,76,0.45);
    }
    .locked-item-overlay{display:none}

    /* ==================== Upgrade Modal ==================== */
    #upgradeModal{
        position:fixed;inset:0;z-index:9999;
        background:rgba(0,0,0,0.6);
        backdrop-filter:blur(4px);
        display:none;align-items:center;justify-content:center;
        padding:20px;
    }
    #upgradeModal.show{display:flex}
    .upgrade-modal-content{
        background:var(--bg-card);
        border-radius:var(--radius-2xl);
        max-width:480px;width:100%;
        padding:var(--space-8);
        text-align:center;
        position:relative;
        box-shadow:0 32px 64px -16px rgba(0,0,0,0.4);
        animation:modalIn 0.3s ease;
    }
    @keyframes modalIn{
        from{opacity:0;transform:scale(0.9) translateY(20px)}
        to{opacity:1;transform:scale(1) translateY(0)}
    }
    .upgrade-modal-close{
        position:absolute;top:16px;left:16px;
        width:36px;height:36px;border-radius:50%;
        background:var(--bg-secondary);border:none;
        display:flex;align-items:center;justify-content:center;
        cursor:pointer;color:var(--text-secondary);
        transition:all 0.3s ease;
    }
    .upgrade-modal-close:hover{background:#ef4444;color:#fff}
    .upgrade-modal-icon{
        width:80px;height:80px;margin:0 auto var(--space-5);
        border-radius:50%;
        background:linear-gradient(135deg,rgba(201,168,76,0.15),rgba(201,168,76,0.05));
        color:var(--color-secondary);
        display:flex;align-items:center;justify-content:center;
        font-size:2rem;
        position:relative;
    }
    .upgrade-modal-icon::before{
        content:'';
        position:absolute;inset:-8px;
        border-radius:50%;
        border:2px dashed rgba(201,168,76,0.4);
        animation:spin 20s linear infinite;
    }
    @keyframes spin{to{transform:rotate(360deg)}}
    .upgrade-modal-content h3{
        font-size:var(--text-xl);font-weight:bold;
        margin-bottom:var(--space-2);color:var(--text-primary);
    }
    .upgrade-modal-content > p{
        color:var(--text-tertiary);font-size:var(--text-sm);
        margin-bottom:var(--space-6);line-height:1.8;
    }
    .upgrade-modal-content > p strong{color:var(--color-secondary);font-weight:bold}
    .upgrade-modal-btn{
        display:inline-flex;align-items:center;justify-content:center;gap:8px;
        padding:14px 32px;
        background:linear-gradient(135deg,var(--color-secondary),var(--color-secondary-dark));
        color:#fff;border:none;border-radius:var(--radius-lg);
        font-family:var(--font-body);font-size:var(--text-md);font-weight:bold;
        cursor:pointer;text-decoration:none;
        transition:all 0.3s ease;
        box-shadow:0 8px 24px rgba(201,168,76,0.35);
    }
    .upgrade-modal-btn:hover{
        transform:translateY(-2px);
        box-shadow:0 12px 32px rgba(201,168,76,0.5);
        color:#fff;
    }