?/* ========================================
   پلتفرم فروش دکانو - استایل‌های مشترک
   ======================================== */

/* تعریف فونت دانا */
@font-face {
  font-family: 'Dana';
  src: url('./fonts/DanaFaNum-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: 'Dana';
  src: url('./fonts/DanaFaNum-Medium.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
}

@font-face {
  font-family: 'Dana';
  src: url('./fonts/DanaFaNum-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
}

/* متغیرهای رنگی */
:root {
  --primary: #101E33;
  --primary-dark: #0B1626;
  --secondary: #3B82F6;
  --background: #FFFFFF;
  --surface-muted: #F9FAFB;
  --text-primary: #1F2937;
  --text-secondary: #6B7280;
  --placeholder-text: #9CA3AF;
  --placeholder-bg: #F8FAFC;
  --accent-warning: #C24141;
  --accent-warm: #F59E0B;
  --white: #FFFFFF;
  --border-color: #E5E7EB;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  --bottom-nav-height: 70px;
}

/* تنظیمات پایه */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Dana', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: var(--background);
  color: var(--text-primary);
  direction: rtl;
  text-align: right;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Mobile page title spacing */
@media (max-width: 768px) {
  .page-header h1,
  .page-title h1,
  .page-title-block h1,
  .header-title h1,
  .header-title-wrap h1,
  .products-header h1,
  .products-header .header-title h1,
  .feature-disabled-title,
  .container > h1:first-of-type {
    padding-top: 5px !important;
    padding-bottom: 12px !important;
    padding-right: 5px !important;
  }

  .page-header h1 i[data-lucide],
  .page-header h1 svg.lucide,
  .page-title h1 i[data-lucide],
  .page-title h1 svg.lucide,
  .page-title-block h1 i[data-lucide],
  .page-title-block h1 svg.lucide,
  .header-title h1 i[data-lucide],
  .header-title h1 svg.lucide,
  .header-title-wrap h1 i[data-lucide],
  .header-title-wrap h1 svg.lucide,
  .products-header h1 i[data-lucide],
  .products-header h1 svg.lucide,
  .products-header .header-title h1 i[data-lucide],
  .products-header .header-title h1 svg.lucide,
  .container > h1:first-of-type i[data-lucide],
  .container > h1:first-of-type svg.lucide,
  .page-header p i[data-lucide],
  .page-header p svg.lucide,
  .page-title p i[data-lucide],
  .page-title p svg.lucide,
  .page-title-block p i[data-lucide],
  .page-title-block p svg.lucide,
  .header-title p i[data-lucide],
  .header-title p svg.lucide,
  .header-title-wrap p i[data-lucide],
  .header-title-wrap p svg.lucide,
  .products-header p i[data-lucide],
  .products-header p svg.lucide,
  .products-header .header-title p i[data-lucide],
  .products-header .header-title p svg.lucide {
    display: none !important;
  }
}

/* کانتینر اصلی */
/* Unified page heading */
.platform-page-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.platform-page-heading-main {
  min-width: 0;
}

.platform-page-title {
  margin: 0 !important;
  font-size: 1.75rem !important;
  font-weight: 700 !important;
  line-height: 1.45 !important;
  color: var(--text-primary) !important;
  padding-top: 20px;
  padding-bottom: 12px;
  padding-right: 5px;
}

.platform-page-heading-main .platform-page-title,
.page-title-block .platform-page-title,
.products-header .platform-page-title,
.header-title .platform-page-title,
.page-header .platform-page-title,
.container > h1.platform-page-title:first-of-type {
  font-size: 1.75rem !important;
  line-height: 1.45 !important;
  padding-top: 20px !important;
  padding-bottom: 12px !important;
  padding-right: 5px !important;
}

.platform-page-subtitle {
  color: var(--text-secondary) !important;
  font-size: 0.95rem;
  line-height: 1.8;
  margin: 0.18rem 0 0 0 !important;
}

.page-title-block .platform-page-subtitle,
.products-header .platform-page-subtitle,
.header-title .platform-page-subtitle,
.page-header .platform-page-subtitle {
  margin-top: 0.18rem !important;
}

.platform-page-subtitle-compact {
  margin-top: 0.12rem !important;
}

.page-title-block .platform-page-subtitle-compact {
  margin-top: 0.12rem !important;
}

.platform-page-title i[data-lucide],
.platform-page-title svg.lucide,
.platform-page-subtitle i[data-lucide],
.platform-page-subtitle svg.lucide {
  display: none !important;
}

@media (max-width: 768px) {
  .platform-page-heading {
    align-items: stretch;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
  }

  .platform-page-heading-main .platform-page-title,
  .page-title-block .platform-page-title,
  .products-header .platform-page-title,
  .header-title .platform-page-title,
  .page-header .platform-page-title,
  .container > h1.platform-page-title:first-of-type {
    font-size: 1.26rem !important;
    line-height: 1.45 !important;
    padding-top: 20px !important;
    padding-bottom: 12px !important;
    padding-right: 5px !important;
  }

  .platform-page-subtitle {
    font-size: 0.9rem;
  }
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* دکمه‌های پایه */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: 0.5rem;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'Dana', sans-serif;
  text-decoration: none;
}

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

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

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

.btn-secondary:hover {
  background-color: #032c3d;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

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

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

/* Form and modal button consistency */
.modal-footer .btn,
.form-actions .btn {
  box-shadow: none !important;
}

.modal-footer .btn.btn-outline,
.form-actions .btn.btn-outline {
  background-color: #e5e7eb !important;
  border: none !important;
  color: #4b5563 !important;
}

.modal-footer .btn.btn-outline:hover,
.form-actions .btn.btn-outline:hover {
  background-color: #d1d5db !important;
  border: none !important;
  color: #374151 !important;
}

.modal-footer .btn.btn-primary,
.form-actions .btn.btn-primary {
  background-color: var(--primary) !important;
  border: 1px solid var(--primary) !important;
  color: var(--white) !important;
  transition: none !important;
  animation: none !important;
  transform: none !important;
  box-shadow: none !important;
}

.modal-footer .btn.btn-primary:hover,
.form-actions .btn.btn-primary:hover {
  background-color: var(--accent-warm) !important;
  border-color: var(--accent-warm) !important;
  color: #1f2937 !important;
  transform: none !important;
  box-shadow: none !important;
}

.modal-footer .btn.btn-primary:focus,
.modal-footer .btn.btn-primary:active,
.form-actions .btn.btn-primary:focus,
.form-actions .btn.btn-primary:active {
  transition: none !important;
  animation: none !important;
  transform: none !important;
  box-shadow: none !important;
}

.create-link-btn,
.create-link-btn:hover,
.create-link-btn:focus {
  box-shadow: none !important;
}

/* Shared platform toasts */
.platform-toast-stack {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 1600;
  width: min(380px, calc(100vw - 2rem));
}

.platform-toast-item {
  box-shadow: var(--shadow-md);
  margin-bottom: 0.65rem;
}

/* Unified filter section look across pages */
.filters,
.orders-filters,
.customers-filters,
.payment-links-filters,
.filter-section {
  background: #ffffff !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 0.92rem !important;
  box-shadow: none !important;
}

.filters input[type="search"],
.filters input[type="text"],
.orders-filters input[type="search"],
.orders-filters input[type="text"],
.customers-filters input[type="search"],
.customers-filters input[type="text"],
.payment-links-filters input[type="search"],
.payment-links-filters input[type="text"] {
  background: #f3f4f6 !important;
  border: none !important;
  box-shadow: none !important;
}

.filters input[type="search"]:focus,
.filters input[type="text"]:focus,
.orders-filters input[type="search"]:focus,
.orders-filters input[type="text"]:focus,
.customers-filters input[type="search"]:focus,
.customers-filters input[type="text"]:focus,
.payment-links-filters input[type="search"]:focus,
.payment-links-filters input[type="text"]:focus {
  background: #e5e7eb !important;
  border: none !important;
  box-shadow: none !important;
}

.filters select,
.filters input[type="date"],
.filters input[type="number"],
.filters .form-input:not([type="text"]):not([type="search"]),
.orders-filters select,
.orders-filters input[type="date"],
.orders-filters input[type="number"],
.orders-filters .form-input:not([type="text"]):not([type="search"]),
.customers-filters select,
.customers-filters input[type="date"],
.customers-filters input[type="number"],
.customers-filters .form-input:not([type="text"]):not([type="search"]),
.payment-links-filters select,
.payment-links-filters input[type="date"],
.payment-links-filters input[type="number"],
.payment-links-filters .form-input:not([type="text"]):not([type="search"]),
.filter-section .filter-group select,
.filter-section .filter-group input[type="date"] {
  background: #ffffff !important;
  border: 1px solid #cfd9e5 !important;
  box-shadow: none !important;
}

.filters .custom-select,
.customers-filters .custom-select,
.orders-filters .custom-select,
.payment-links-filters .platform-select-trigger {
  background: #ffffff !important;
  border: 1px solid #cfd9e5 !important;
  box-shadow: none !important;
}

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

.btn-danger:hover {
  background-color: #a33636;
}

/* دکمه‌های عملیات جدول */
.action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 0.5rem;
  background-color: var(--background);
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0;
  font-size: 1rem;
  min-width: 36px;
}

.action-btn:hover {
  background-color: var(--primary);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.action-btn:active {
  transform: translateY(0);
}

.action-btn svg,
.action-btn i {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* کارت‌های پایه */
.card {
  background: var(--white);
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
}

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

/* فیلدهای فرم */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-primary);
  font-size: 0.95rem;
}

.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  border: 2px solid var(--border-color);
  border-radius: 0.5rem;
  font-family: 'Dana', sans-serif;
  transition: all 0.3s ease;
  background-color: var(--white);
  color: var(--text-primary);
  font-weight: 500;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(16, 30, 51, 0.1);
}

.form-input::placeholder {
  color: var(--placeholder-text);
  font-weight: 400;
  opacity: 1;
}

.form-input:placeholder-shown {
  background-color: var(--placeholder-bg);
}

input::placeholder,
textarea::placeholder {
  color: var(--placeholder-text);
  opacity: 1;
}

/* Vendor numeric input enhancements */
.platform-unit-wrap {
  position: relative;
}

.platform-unit-field {
  padding-left: 4rem !important;
}

.platform-unit-label {
  position: absolute !important;
  left: 1rem !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  color: var(--text-secondary) !important;
  font-size: 0.85rem !important;
  font-weight: 600 !important;
  pointer-events: none !important;
  z-index: 2;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type="number"] {
  -moz-appearance: textfield;
}

/* Select و Dropdown */
select.form-input {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: left 0.75rem center;
  background-size: 1.2em 1.2em;
  padding-right: 1rem;
  padding-left: 2rem;
  color: var(--text-primary);
}

select.form-input:hover {
  border-color: var(--primary);
  background-color: #fafbfc;
}

select.form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(16, 30, 51, 0.1);
}

/* Option Styling */
select.form-input option {
  color: var(--text-primary);
  background-color: var(--white);
  padding: 0.85rem 1rem;
  border-radius: 0.5rem;
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
  font-family: 'Dana', sans-serif;
  border: none;
  line-height: 1.6;
}

select.form-input option:hover {
  background: #101E33;
  background-color: #101E33;
  color: var(--white);
}

select.form-input option:checked {
  background: #101E33;
  background-color: #101E33;
  color: var(--white);
  font-weight: 600;
}

select.form-input option:disabled {
  color: var(--text-secondary);
  background-color: var(--background);
}

/* Responsive Form Inputs */
@media (max-width: 768px) {
  input.form-input {
    flex: 0 0 100% !important;
  }

  .custom-select-wrapper {
    flex: 0 0 calc(50% - 0.5rem) !important;
    max-width: 100% !important;
    width: auto !important;
  }
}

/* Custom Dropdown */
.custom-select-wrapper {
  position: relative;
  display: block;
  width: 100%;
  max-width: 100%;
}

.custom-select {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  cursor: pointer;
  appearance: none;
  background-color: var(--white);
  border: 2px solid var(--border-color);
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  padding-left: 2rem;
  font-size: 0.95rem;
  font-family: 'Dana', sans-serif;
  color: var(--text-primary);
  transition: all 0.3s ease;
  width: 100%;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: left 0.75rem center;
  background-size: 1.2em 1.2em;
}

.custom-select:hover {
  border-color: var(--primary);
  background-color: #fafbfc;
}

.custom-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(16, 30, 51, 0.1);
}

.custom-options {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background-color: var(--white);
  border: 2px solid var(--primary);
  border-top: none;
  border-radius: 0 0 0.4rem 0.4rem;
  max-height: 240px;
  overflow-y: auto;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  margin-top: -2px;
  width: 100%;
  box-sizing: border-box;
}

.custom-options.active {
  display: block;
  animation: slideDown 0.2s ease;
}

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

.custom-option {
  padding: 0.6rem 0.85rem;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s ease;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  white-space: normal;
  word-break: break-word;
  width: 100%;
  box-sizing: border-box;
}

.custom-option:last-child {
  border-bottom: none;
}

.custom-option:hover {
  background-color: var(--primary);
  color: var(--white);
  padding-left: 1.1rem;
}

.custom-option.selected {
  background-color: #f3f4f6;
  color: var(--primary);
  font-weight: 600;
  border-right: 3px solid var(--primary);
  padding-right: calc(1rem - 3px);
}

.custom-option.selected:hover {
  background-color: var(--primary);
  color: var(--white);
  border-right-color: var(--white);
}

/* Scrollbar Styling */
.custom-options::-webkit-scrollbar {
  width: 6px;
}

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

.custom-options::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 10px;
}

.custom-options::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* هدر */
.header {
  background: var(--white);
  box-shadow: var(--shadow-sm);
  padding: 1rem 0;
  padding-left: 80px;
  position: sticky;
  top: 0;
  z-index: 100;
}

@media (max-width: 768px) {
  .header {
    padding-left: 0;
  }
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
}

/* Grid Cards برای داشبورد */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
  margin-top: 2rem;
}

@media (max-width: 1024px) {
  .dashboard-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
  }
}

@media (max-width: 768px) {
  .dashboard-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.75rem;
  }
}

.dashboard-card {
  background: var(--white);
  border-radius: 1rem;
  padding: 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  box-shadow: var(--shadow-md);
  text-decoration: none;
  display: block;
}

.dashboard-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.dashboard-card-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
  color: var(--primary);
}

.dashboard-card-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
  text-decoration: none;
  border-bottom: none;
}

.dashboard-card-description {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.4;
  text-decoration: none;
  border-bottom: none;
}

@media (max-width: 768px) {
  .dashboard-card-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
  }

  .dashboard-card-title {
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
  }

  .dashboard-card-description {
    font-size: 0.75rem;
  }
}

/* جدول */
.table-container {
  background: var(--white);
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  overflow-x: auto;
}

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

.table thead {
  background-color: var(--background);
}

.table th {
  padding: 1rem;
  text-align: right;
  font-weight: 600;
  color: var(--text-primary);
  border-bottom: 2px solid var(--border-color);
}

.table td {
  padding: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.table tbody tr:hover {
  background-color: var(--background);
}

/* بج‌ها */
.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  font-size: 0.85rem;
  font-weight: 500;
  border-radius: 9999px;
}

.badge-success {
  background-color: #d1fae5;
  color: #065f46;
}

.badge-warning {
  background-color: #fef3c7;
  color: #92400e;
}

.badge-danger {
  background-color: #fee2e2;
  color: #991b1b;
}

.badge-info {
  background-color: #dbeafe;
  color: #1e40af;
}

/* Responsive */
@media (max-width: 768px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .container {
    padding: 0 0.75rem;
  }

  .card {
    padding: 1rem;
  }

  .dashboard-card {
    padding: 1.5rem;
  }
}

/* آیکون‌ها (استفاده از Unicode) */
.icon {
  display: inline-block;
  width: 1.5rem;
  height: 1.5rem;
  vertical-align: middle;
}

/* انیمیشن لود */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.5s ease-out;
}

/* Stat Cards */
.stat-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: #101E33;
  color: var(--white);
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
}

.stat-card-value {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.stat-card-label {
  font-size: 0.9rem;
  opacity: 0.9;
}

/* Loading Spinner */
.spinner {
  display: inline-block;
  width: 2rem;
  height: 2rem;
  border: 3px solid rgba(16, 30, 51, 0.24);
  border-radius: 50%;
  border-top-color: var(--primary);
  animation: spin 1s ease-in-out infinite;
}

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

/* Alert Messages */
.alert {
  padding: 1rem 1.5rem;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.alert-success {
  background-color: #d1fae5;
  color: #065f46;
  border-right: 4px solid #10b981;
}

.alert-error {
  background-color: #fee2e2;
  color: #991b1b;
  border-right: 4px solid #ef4444;
}

.alert-warning {
  background-color: #fef3c7;
  color: #92400e;
  border-right: 4px solid #f59e0b;
}

.alert-info {
  background-color: #dbeafe;
  color: #1e40af;
  border-right: 4px solid #3b82f6;
}

/* Platform Confirm Dialog */
.platform-confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  z-index: 1250;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
}

.platform-confirm-card {
  width: min(390px, 100%);
  background: #fff;
  border-radius: 0.7rem;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.16);
  border: 1px solid var(--border-color);
  overflow: hidden;
}

.platform-confirm-body {
  padding: 0.85rem 0.9rem 0.85rem;
}

.platform-confirm-message {
  margin: 0;
  padding: 0;
  border: none;
  background: #fff;
  color: var(--text-primary);
  font-size: 0.86rem;
  line-height: 1.55;
}

.platform-confirm-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
  margin-top: 0.72rem;
  flex-wrap: nowrap;
}

.platform-confirm-actions .btn {
  padding: 0.52rem 0.9rem;
  min-height: 36px;
  font-size: 0.84rem;
  line-height: 1;
  box-shadow: none !important;
  border-radius: 0.45rem;
}

.platform-confirm-actions .btn.btn-outline {
  border: none !important;
  background: #e5e7eb !important;
  color: #4b5563 !important;
}

.platform-confirm-actions .btn.btn-outline:hover {
  border: none !important;
  background: #d1d5db !important;
  color: #374151 !important;
}

.platform-confirm-actions .btn.btn-primary {
  background: #101E33 !important;
  border: 1px solid #101E33 !important;
  color: #ffffff !important;
  transition: none !important;
  animation: none !important;
  transform: none !important;
}

.platform-confirm-actions .btn.btn-primary:hover {
  background: #F59E0B !important;
  border-color: #F59E0B !important;
  color: #1f2937 !important;
  transform: none !important;
}

.platform-confirm-actions .btn.btn-primary:focus,
.platform-confirm-actions .btn.btn-primary:active {
  transition: none !important;
  animation: none !important;
  transform: none !important;
}

@media (max-width: 768px) {
  .platform-confirm-card {
    width: min(340px, 100%);
  }

  .platform-confirm-body {
    padding: 0.78rem 0.8rem 0.78rem;
  }

  .platform-confirm-actions .btn {
    min-height: 34px;
    padding: 0.48rem 0.72rem;
    font-size: 0.82rem;
  }
}

/* ========================================
   Bottom Navigation Bar (Mobile App Style)
   ======================================== */

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  min-height: var(--bottom-nav-height);
  background: #fff;
  border-top: 1px solid #e8edf3;
  box-shadow: 0 -4px 20px rgba(16, 30, 51, 0.09);
  display: flex;
  justify-content: space-around;
  align-items: stretch;
  z-index: 1000;
  padding: 0;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

/* Extend nav background into safe-area / gesture bar */
.bottom-nav::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: 60px;
  background: #fff;
  pointer-events: none;
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.18rem;
  padding: 0.5rem 0.4rem 0.42rem;
  flex: 1;
  text-decoration: none;
  color: #94a3b8;
  font-family: 'Dana', -apple-system, sans-serif;
  border-radius: 0;
  cursor: pointer;
  background: transparent;
  border: none;
  position: relative;
  transition: color 0.18s ease;
}

.bottom-nav-item::after {
  content: '';
  position: absolute;
  top: 0;
  left: 22%;
  right: 22%;
  height: 2.5px;
  background: transparent;
  border-radius: 0 0 4px 4px;
  transition: background 0.18s ease;
}

.bottom-nav-item:hover { color: #64748b; }

.bottom-nav-item.active {
  color: #F59E0B;
}

.bottom-nav-item.active::after {
  background: #F59E0B;
}

.bottom-nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  transition: transform 0.18s ease;
}

.bottom-nav-item.active .bottom-nav-icon {
  transform: translateY(-1px);
}

.bottom-nav-icon svg {
  width: 22px;
  height: 22px;
  stroke-width: 1.8;
}

.bottom-nav-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-align: center;
  line-height: 1;
}

.bottom-nav-menu-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-family: 'Dana', sans-serif;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.18rem;
  padding: 0.5rem 0.4rem 0.42rem;
  position: relative;
  color: #94a3b8;
  transition: color 0.18s ease;
}

.bottom-nav-menu-btn .bottom-nav-icon {
  background: #101e33;
  border-radius: 10px;
  width: 34px;
  height: 34px;
  color: #F59E0B;
}

.bottom-nav-menu-btn .bottom-nav-icon svg {
  width: 17px;
  height: 17px;
  stroke-width: 2.2;
}

.bottom-nav-menu-btn .bottom-nav-label {
  color: #101e33;
  font-weight: 800;
}

/* اضافه کردن padding به body برای جلوگیری از پوشش محتوا */
body {
  padding-bottom: calc(var(--bottom-nav-height) + 1rem);
}

/* ========================================
   Nav Menu Sheet (Mobile)
   ======================================== */
#nav-menu-sheet {
  display: none;
}

@media (max-width: 768px) {
  #nav-menu-sheet {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1700;
    align-items: flex-end;
    background: rgba(10, 18, 32, 0.55);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
  }

  #nav-menu-sheet.active {
    display: flex;
  }

  #nav-menu-sheet .nav-sheet-content {
    width: 100%;
    max-height: 76dvh;
    border-radius: 24px 24px 0 0;
    background: #fff;
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
    overflow: hidden;
    box-shadow: 0 -20px 60px rgba(10, 18, 32, 0.28);
  }

  #nav-menu-sheet.active .nav-sheet-content {
    transform: translateY(0);
  }

  .nav-sheet-header {
    background: #101e33;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding-bottom: 0.72rem;
  }

  .nav-sheet-drag-bar {
    width: 36px;
    height: 4px;
    background: rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    margin: 0.65rem auto 0;
    flex-shrink: 0;
  }

  .nav-sheet-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.52rem 1rem 0;
    gap: 0.5rem;
  }

  .nav-sheet-title {
    font-size: 0.92rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.3;
  }

  .nav-sheet-close {
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    flex-shrink: 0;
  }

  .nav-sheet-close:hover,
  .nav-sheet-close:active {
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
  }

  .nav-sheet-close svg {
    width: 15px;
    height: 15px;
    stroke-width: 2.2;
  }

  .nav-sheet-list {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    align-content: start;
    gap: 0.5rem;
    padding: 0.95rem 0.7rem calc(1.25rem + env(safe-area-inset-bottom, 0px));
  }

  .nav-sheet-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 0.38rem;
    padding: 0.54rem 0.15rem 0.48rem;
    border: 1px solid #e6ebf2;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafd 100%);
    border-radius: 14px;
    text-decoration: none;
    color: #334155;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.15s ease, opacity 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
    min-height: 94px;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.06);
  }

  .nav-sheet-item:active {
    transform: scale(0.95);
    opacity: 0.8;
  }

  .nav-sheet-icon {
    width: 42px;
    height: 42px;
    border-radius: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.2);
  }

  .nav-sheet-icon svg {
    width: 20px;
    height: 20px;
    stroke-width: 1.7;
  }

  .nav-sheet-label {
    font-size: 0.66rem;
    font-weight: 760;
    line-height: 1.25;
    color: #334155;
    text-align: center;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-width: 68px;
  }

  .nav-sheet-item.active {
    border-color: #101e33;
    background: #101e33;
    box-shadow: 0 10px 22px rgba(16, 30, 51, 0.26);
  }

  .nav-sheet-item.active .nav-sheet-icon {
    background: rgba(255, 255, 255, 0.12) !important;
    box-shadow: none;
    color: #F59E0B;
  }

  .nav-sheet-item.active .nav-sheet-label {
    color: #fff;
    font-weight: 800;
  }

  @media (max-width: 420px) {
    .nav-sheet-list {
      padding-left: 0.58rem;
      padding-right: 0.58rem;
      gap: 0.42rem;
    }

    .nav-sheet-item {
      min-height: 90px;
      padding: 0.5rem 0.12rem 0.46rem;
    }

    .nav-sheet-icon {
      width: 40px;
      height: 40px;
    }
  }
}

/* در دسکتاپ مخفی کردن Bottom Nav */
@media (min-width: 769px) {
  .bottom-nav {
    display: none;
  }

  #nav-menu-sheet {
    display: none !important;
  }

  body {
    padding-bottom: 0;
  }
}

/* ========================================
   Sidebar Navigation (Desktop)
   ======================================== */

.sidebar {
  position: fixed;
  right: 0;
  top: 0;
  width: 70px;
  height: 100vh;
  background: var(--white);
  border-left: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
  z-index: 999;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  align-items: center;
  padding-top: 0;
}

/* حالت باز شده - نمایش عناوین */
.sidebar.expanded {
  width: 250px;
  align-items: stretch;
  padding-top: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-bottom: 1rem;
}

/* نمایش Sidebar در دسکتاپ - همیشه نمایش داده می‌شود */
@media (min-width: 769px) {
  .sidebar {
    display: flex !important;
    transform: translateX(0);
  }
}

/* موبایل - Sidebar پنهان است بطور پیش‌فرض */
@media (max-width: 768px) {
  .sidebar {
    display: flex;
    transform: translateX(100%);
    width: 80px;
  }

  .sidebar.expanded {
    width: 280px;
    transform: translateX(0);
  }

  .sidebar.active {
    transform: translateX(0);
    width: 280px;
    z-index: 999;
  }
}

/* Overlay - مخفی */
@media (min-width: 769px) {
  .sidebar-overlay {
    display: none !important;
  }
}

.vendor-feedback-drawer {
  position: fixed;
  left: 1rem;
  bottom: 1rem;
  z-index: 1200;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.vendor-feedback-drawer-toggle {
  display: none;
  border: none;
  background: var(--primary);
  color: #fff;
  cursor: pointer;
  width: 1.7rem;
  height: 3rem;
  border-radius: 0 0.65rem 0.65rem 0;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 22px rgba(16, 30, 51, 0.24);
}

.vendor-feedback-drawer-toggle i,
.vendor-feedback-drawer-toggle svg {
  width: 1rem;
  height: 1rem;
  transition: transform 0.22s ease;
}

.vendor-feedback-fab {
  border: none;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  box-shadow: 0 10px 24px rgba(16, 30, 51, 0.2);
  padding: 0.75rem 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  cursor: pointer;
  font-family: 'Dana', sans-serif;
  font-size: 0.86rem;
  font-weight: 700;
  transition: all 0.2s ease;
}

.vendor-feedback-fab:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(16, 30, 51, 0.26);
}

.vendor-feedback-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  z-index: 1250;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.vendor-feedback-modal.active {
  display: flex;
}

.vendor-feedback-panel {
  --feedback-sheet-bg: #f4f4f9;
  --feedback-sheet-surface: #ffffff;
  --feedback-sheet-border: #e5e5ea;
  --feedback-sheet-input-border: #d6e0ea;
  --feedback-sheet-muted: #636366;
  --feedback-sheet-strong: #1c1c1e;
  width: min(480px, 100%);
  max-height: min(86vh, 760px);
  background: var(--feedback-sheet-bg);
  border-radius: 28px;
  border: 1px solid var(--feedback-sheet-border);
  box-shadow: 0 24px 56px rgba(16, 24, 40, 0.26);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.vendor-feedback-grabber-wrap {
  display: none;
  justify-content: center;
  align-items: center;
  padding: 0.46rem 0.92rem 0.22rem;
  background: var(--feedback-sheet-bg);
  touch-action: none;
  cursor: grab;
}

.vendor-feedback-grabber-wrap:active {
  cursor: grabbing;
}

.vendor-feedback-grabber {
  width: 42px;
  height: 5px;
  border-radius: 999px;
  background: #cfd7e3;
}

.vendor-feedback-head {
  display: flex;
  justify-content: center;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 3;
  padding: 0.82rem 0.92rem;
  border-bottom: 1px solid var(--feedback-sheet-border);
  background: var(--feedback-sheet-bg);
}

.vendor-feedback-title {
  color: var(--feedback-sheet-strong);
  font-size: 0.96rem;
  font-weight: 800;
}

.vendor-feedback-help {
  margin: 0.76rem 0.92rem 0.35rem;
  padding: 0.66rem 0.76rem;
  border-radius: 14px;
  border: 1px dashed var(--feedback-sheet-border);
  background: var(--feedback-sheet-surface);
  color: #4b5563;
  font-size: 0.76rem;
  line-height: 1.8;
}

#vendor-feedback-form {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 0 0.92rem 0.9rem;
  scrollbar-width: thin;
  scrollbar-color: #cfd7e3 transparent;
}

#vendor-feedback-form::-webkit-scrollbar {
  width: 4px;
}

#vendor-feedback-form::-webkit-scrollbar-track {
  background: transparent;
}

#vendor-feedback-form::-webkit-scrollbar-thumb {
  background: #d4dbe7;
  border-radius: 999px;
}

#vendor-feedback-form::-webkit-scrollbar-thumb:hover {
  background: #c5cddd;
}

#vendor-feedback-form .form-group {
  margin-bottom: 0.68rem !important;
}

#vendor-feedback-form .form-group:last-of-type {
  margin-bottom: 0 !important;
}

#vendor-feedback-form .form-label {
  padding: 0;
  margin-bottom: 0.4rem;
  color: var(--feedback-sheet-muted);
  font-size: 0.8rem;
  font-weight: 700;
}

#vendor-feedback-form .form-input {
  border: 1px solid var(--feedback-sheet-input-border);
  border-radius: 14px;
  background: var(--feedback-sheet-surface);
  box-shadow: none;
  min-height: 44px;
  color: #1f2937;
  font-size: 0.84rem;
}

#vendor-feedback-form #vendor-feedback-type {
  display: none !important;
}

#vendor-feedback-form .vendor-feedback-type-select {
  position: relative;
  width: 100%;
}

#vendor-feedback-form .vendor-feedback-type-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  cursor: pointer;
  text-align: right;
  padding-inline: 0.78rem;
}

#vendor-feedback-form .vendor-feedback-type-trigger i,
#vendor-feedback-form .vendor-feedback-type-trigger svg {
  width: 16px;
  height: 16px;
  color: #7a8394;
  flex-shrink: 0;
  pointer-events: none;
  transition: transform 0.2s ease;
}

#vendor-feedback-form .vendor-feedback-type-select.open .vendor-feedback-type-trigger {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(16, 30, 51, 0.12);
}

#vendor-feedback-form .vendor-feedback-type-select.open .vendor-feedback-type-trigger i,
#vendor-feedback-form .vendor-feedback-type-select.open .vendor-feedback-type-trigger svg {
  transform: rotate(180deg);
}

#vendor-feedback-form .vendor-feedback-type-dropdown {
  position: absolute;
  top: calc(100% + 0.34rem);
  right: 0;
  left: 0;
  z-index: 40;
  display: none;
  background: var(--feedback-sheet-surface);
  border: 1px solid var(--feedback-sheet-border);
  border-radius: 14px;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.14);
  padding: 0.34rem;
  overflow: auto;
}

#vendor-feedback-form .vendor-feedback-type-option {
  width: 100%;
  border: none;
  background: transparent;
  text-align: right;
  padding: 0.54rem 0.62rem;
  border-radius: 10px;
  cursor: pointer;
  color: #1f2937;
  font-size: 0.81rem;
  font-weight: 650;
  font-family: 'Dana', sans-serif;
}

#vendor-feedback-form .vendor-feedback-type-option:hover {
  background: #f3f5fb;
}

#vendor-feedback-form .vendor-feedback-type-option.active {
  background: #e8edf8;
  color: var(--primary);
  font-weight: 780;
}

#vendor-feedback-form textarea.form-input {
  min-height: 130px;
  resize: vertical;
  line-height: 1.8;
}

#vendor-feedback-form .form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(16, 30, 51, 0.12);
  outline: none;
}

.vendor-feedback-actions {
  display: flex;
  justify-content: stretch;
  gap: 0.65rem;
  margin-top: auto;
  padding-top: 0.78rem;
  border-top: 1px solid var(--feedback-sheet-border);
}

.vendor-feedback-actions .btn {
  flex: 1 1 0;
  min-height: 44px;
  border-radius: 13px;
  font-size: 0.87rem;
  font-weight: 800;
  border: none;
  box-shadow: none;
}

.vendor-feedback-actions .btn.btn-primary {
  background: var(--primary);
  color: #fff;
}

.vendor-feedback-actions .btn.btn-outline,
.vendor-feedback-actions .btn.btn-secondary {
  background: #e8e8ef;
  color: #1f2937;
  border: none;
}

@media (max-width: 768px) {
  .vendor-feedback-grabber-wrap {
    display: flex;
  }

  .vendor-feedback-drawer {
    left: 0 !important;
    right: auto !important;
    bottom: 5.3rem;
    gap: 0.2rem;
    margin-left: 0 !important;
    padding-left: 0 !important;
    direction: ltr;
    flex-direction: row-reverse;
    background: var(--primary);
    border-radius: 0 0.78rem 0.78rem 0;
    padding: 0.22rem 0.28rem 0.22rem 0.34rem;
    box-shadow: 0 10px 24px rgba(16, 30, 51, 0.24);
    transform: translateX(calc(-100% + 1.95rem));
    transition: transform 0.24s ease, box-shadow 0.24s ease;
  }

  .vendor-feedback-drawer.open {
    transform: translateX(0);
    box-shadow: 0 12px 28px rgba(16, 30, 51, 0.28);
  }

  .vendor-feedback-drawer-toggle {
    display: inline-flex;
    width: 1.6rem;
    height: 2.72rem;
    border-radius: 0.55rem;
    background: transparent;
    box-shadow: none;
  }

  .vendor-feedback-fab {
    left: auto;
    bottom: auto;
    padding: 0.64rem 0.72rem;
    font-size: 0.82rem;
    border-radius: 0.6rem;
    background: transparent;
    box-shadow: none;
    transform: none;
    opacity: 1;
    pointer-events: auto;
    margin-left: 0;
    white-space: nowrap;
  }

  .vendor-feedback-drawer.open .vendor-feedback-fab {
    transform: none;
    opacity: 1;
    pointer-events: auto;
  }

  .vendor-feedback-drawer.open .vendor-feedback-drawer-toggle i,
  .vendor-feedback-drawer.open .vendor-feedback-drawer-toggle svg {
    transform: rotate(180deg);
  }

  .vendor-feedback-fab:hover {
    transform: none;
  }

  .vendor-feedback-modal {
    padding: 0;
    align-items: flex-end;
  }

  .vendor-feedback-panel {
    width: 100vw;
    max-height: 92vh;
    border-radius: 24px 24px 0 0;
    border-left: none;
    border-right: none;
    border-bottom: none;
  }

  .vendor-feedback-grabber-wrap {
    padding-top: 0.5rem;
  }

  #vendor-feedback-form {
    padding: 0 0.95rem 0.86rem;
  }

  #vendor-feedback-form textarea.form-input {
    min-height: 116px;
  }

  .vendor-feedback-actions {
    padding-bottom: calc(0.86rem + env(safe-area-inset-bottom));
  }
}

body.modal-open .vendor-feedback-drawer,
body.feedback-modal-open .vendor-feedback-drawer {
  display: none !important;
}

@media (max-width: 768px) {
  .vendor-feedback-fab {
    box-shadow: none;
  }
}

.sidebar-header {
  padding: 0;
  border-bottom: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: auto;
  background: transparent;
  flex-shrink: 0;
}

.sidebar.expanded .sidebar-header {
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.5rem;
}

.sidebar {
  padding-top: 0;
}

.sidebar-logo {
  display: none;
}

.sidebar-menu-toggle {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-primary);
  padding: 0.5rem 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1),
              color 0.3s ease;
  width: 70px;
  height: auto;
  border-radius: 0;
  border-right: 3px solid transparent;
  flex-shrink: 0;
  overflow: hidden;
}

.toggle-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
  min-width: 20px;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.toggle-label {
  font-size: 0.85rem;
  opacity: 0;
  white-space: nowrap;
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.15s;
  flex: 0;
  overflow: hidden;
}

.sidebar-menu-toggle:hover {
  color: var(--primary);
}

.sidebar.expanded .sidebar-menu-toggle {
  width: 250px;
  justify-content: flex-start;
}

.sidebar-close {
  display: none;
}

@media (max-width: 768px) {
  .sidebar-close {
    display: block;
  }
}

/* حالت باز شده */
.sidebar.expanded .sidebar-header {
  border-bottom: 1px solid var(--border-color);
  justify-content: flex-start;
  padding-left: 1rem;
}

.sidebar-menu {
  flex: 1;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  gap: 0;
  overflow-y: hidden;
  overflow-x: hidden;
  margin-top: 0;
  transition: gap 0.5s cubic-bezier(0.4, 0, 0.2, 1),
              padding 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  min-height: 0;
}

.sidebar.expanded .sidebar-menu {
  overflow-y: auto;
  overflow-x: hidden;
  gap: 0;
  align-items: stretch;
  padding: 0;
  min-height: 0;
}

.sidebar-menu-item {
  padding: 0;
  margin: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  list-style: none;
  flex-shrink: 0;
  position: relative;
}

.sidebar.expanded .sidebar-menu-item {
  justify-content: flex-start;
  flex-shrink: 0;
  margin-top: 0;
  padding-top: 0;
  border-top: none !important;
}

/* Separator between user and product menu items */
.sidebar-menu-item:nth-child(5)::before {
  content: '';
  position: absolute;
  top: -0.5rem;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--border-color);
  display: none !important;
}

.sidebar.expanded .sidebar-menu-item:nth-child(5)::before {
  display: none !important;
}

.sidebar-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 0.5rem;
  color: var(--text-primary);
  text-decoration: none;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1),
              color 0.3s ease,
              border-right-color 0.3s ease;
  border-right: 3px solid transparent;
  border-radius: 0;
  margin: 0;
  width: 70px;
  height: auto;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

/* Expanded state - show full width and flex */
.sidebar.expanded .sidebar-link {
  width: 250px;
  justify-content: flex-start;
  flex-shrink: 0;
}


.sidebar-link:hover {
  color: var(--primary);
}

.sidebar-link.active {
  color: var(--primary);
  border-right-color: var(--primary);
  font-weight: 600;
}

.sidebar-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
  transition: all 0.3s ease;
  min-width: 20px;
  color: var(--text-secondary);
}

.sidebar-link:hover .sidebar-icon {
  color: var(--primary);
}

.sidebar-link.active .sidebar-icon {
  color: var(--primary);
}

.sidebar-label {
  flex: 0;
  font-size: 0.85rem;
  white-space: nowrap;
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.15s,
              flex 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.15s;
  opacity: 0;
  color: var(--text-primary);
  overflow: hidden;
}

.sidebar-link:hover .sidebar-label {
  color: var(--primary);
}

.sidebar-link.active .sidebar-label {
  color: var(--primary);
  font-weight: 600;
}

/* حالت باز شده */
.sidebar.expanded .sidebar-label {
  opacity: 1;
  flex: 1;
}

.sidebar-footer {
  display: none;
}

.sidebar-footer-btn {
  width: 50px;
  height: 50px;
  padding: 0.75rem;
  background: none;
  color: var(--text-primary);
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  font-family: 'Dana', sans-serif;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.sidebar-footer-btn:hover {
  background: var(--background);
  color: var(--primary);
}

/* حالت باز شده - Footer مخفی */
.sidebar.expanded .sidebar-footer {
  display: none;
}

/* Scrollbar styling برای expanded menu */
.sidebar.expanded .sidebar-menu::-webkit-scrollbar {
  width: 6px;
}

.sidebar.expanded .sidebar-menu::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar.expanded .sidebar-menu::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 3px;
}

.sidebar.expanded .sidebar-menu::-webkit-scrollbar-thumb:hover {
  background: var(--text-secondary);
}

/* Firefox */
.sidebar.expanded .sidebar-menu {
  scrollbar-color: var(--border-color) transparent;
  scrollbar-width: thin;
}

/* Overlay برای موبایل */
.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 998;
}

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

@media (min-width: 769px) {
  .sidebar-overlay {
    display: none !important;
  }
}


