/* ==========================================================================
   SELLER DASHBOARD — CRYPTO BLUE FINTECH-GRADE DESIGN SYSTEM
   Clean, Minimal, High-Precision Interface for Fashion Shop Management
   ========================================================================== */

@font-face {
  font-family: 'Vazirmatn';
  src: url('assets/fonts/Vazirmatn.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Crypto Blue Palette */
  --primary: #0052FF;
  --primary-hover: #003ECB;
  --primary-light: #EBF2FF;
  --primary-surface: #F4F8FF;
  
  --secondary: #5B616E;
  --neutral: #8A919E;
  --neutral-light: #F3F4F6;

  --bg-page: #F9FAFB;
  --bg-surface: #FFFFFF;
  --bg-subtle: #F3F4F6;

  --text-primary: #050F1A;
  --text-secondary: #5B616E;
  --text-dim: #8A919E;

  --border-light: #E5E7EB;
  --border-card: #D1D5DB;

  --success: #05B169;
  --success-light: #E6F6EF;
  --warning: #F0AD4E;
  --warning-light: #FEF6EC;
  --danger: #DF2935;
  --danger-light: #FDECEE;

  --sidebar-width: 250px;

  /* Border Radii (Crypto Blue spec) */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;

  /* Shadows (Flat elevation spec) */
  --shadow-lvl1: 0 1px 3px rgba(5, 15, 26, 0.05);
  --shadow-lvl2: 0 4px 12px rgba(5, 15, 26, 0.08);
  --shadow-lvl3: 0 12px 24px rgba(5, 15, 26, 0.12);

  --font-main: 'Vazirmatn', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --tr-fast: 0.15s ease;
  --tr-smooth: 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  font-family: var(--font-main);
  background-color: var(--bg-page);
  color: var(--text-primary);
  direction: rtl;
  text-align: right;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
  width: 100%;
}

input, button, select, textarea {
  font-family: inherit;
  font-size: inherit;
  border: none;
  outline: none;
  background: none;
}

img {
  max-width: 100%;
  display: block;
}

/* Master Layout */
.app-layout-wrapper {
  display: flex;
  min-height: 100vh;
  width: 100%;
  overflow-x: hidden;
}

/* ==========================================================================
   1. DESKTOP RIGHT SIDEBAR NAVIGATION
   ========================================================================== */
.app-sidebar {
  width: var(--sidebar-width);
  background: var(--bg-surface);
  border-left: 1px solid var(--border-light);
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px 16px;
  box-shadow: var(--shadow-lvl1);
}

.sidebar-brand-box {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-light);
}

.sidebar-avatar {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.2rem;
  flex-shrink: 0;
  overflow: hidden;
  border: 1px solid rgba(0, 82, 255, 0.2);
}
.sidebar-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sidebar-shop-name {
  font-size: 0.9375rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.3;
}
.sidebar-status-tag {
  font-size: 0.6875rem;
  color: var(--success);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 2px;
}
.sidebar-status-tag .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
}

/* Sidebar Menu Links */
.sidebar-nav-menu {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 20px;
  flex: 1;
}

.nav-item-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--tr-fast);
  position: relative;
}

.nav-item-btn svg {
  width: 18px;
  height: 18px;
  color: var(--neutral);
  transition: var(--tr-fast);
}

.nav-item-btn:hover {
  background: var(--bg-subtle);
  color: var(--text-primary);
}
.nav-item-btn:hover svg {
  color: var(--primary);
}

.nav-item-btn.active {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 800;
}
.nav-item-btn.active svg {
  color: var(--primary);
}

.nav-badge-count {
  margin-right: auto;
  background: var(--warning);
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: var(--radius-full);
}

.sidebar-footer-box {
  padding-top: 14px;
  border-top: 1px solid var(--border-light);
  font-size: 0.6875rem;
  color: var(--text-dim);
  text-align: center;
}

/* ==========================================================================
   2. MAIN CONTENT WRAPPER & HEADER
   ========================================================================== */
.app-main-content {
  flex: 1;
  margin-right: var(--sidebar-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  width: calc(100% - var(--sidebar-width));
}

.app-header {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow-lvl1);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 12px;
}

.current-tab-title-box h1 {
  font-size: 1.125rem;
  font-weight: 800;
  color: var(--text-primary);
}
.current-tab-title-box p {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.btn-add-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary);
  color: #fff;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--tr-fast);
  white-space: nowrap;
}
.btn-add-primary:hover {
  background: var(--primary-hover);
}

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 16px;
}

.tab-view-section {
  display: none;
  padding: 20px 0 80px;
}
.tab-view-section.active {
  display: block;
  animation: fadeIn 0.2s ease;
}

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

/* ==========================================================================
   3. TAB 1: PRODUCTS VIEW
   ========================================================================== */
.quick-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-lvl1);
  transition: var(--tr-fast);
}
.stat-card:hover {
  border-color: var(--primary);
}

.stat-info span {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  display: block;
}
.stat-info b {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-primary);
  display: block;
  margin-top: 2px;
}

.stat-icon-wrap {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.stat-icon-wrap.blue { background: var(--primary-light); color: var(--primary); }
.stat-icon-wrap.green { background: var(--success-light); color: var(--success); }
.stat-icon-wrap.amber { background: var(--warning-light); color: var(--warning); }
.stat-icon-wrap.rose { background: var(--danger-light); color: var(--danger); }

.management-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-lvl1);
}

.panel-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.search-box-wrap {
  position: relative;
  flex: 1;
  width: 100%;
}
.search-icon-svg {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--neutral);
  pointer-events: none;
}
.search-input-field {
  width: 100%;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 9px 38px 9px 14px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-primary);
  transition: var(--tr-fast);
}
.search-input-field:focus {
  background: #fff;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 82, 255, 0.12);
}

.filter-chips-scroll {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 16px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.filter-chips-scroll::-webkit-scrollbar {
  display: none;
}

.filter-chip-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--bg-subtle);
  color: var(--text-secondary);
  border: 1px solid var(--border-light);
  cursor: pointer;
  white-space: nowrap;
  transition: var(--tr-fast);
  flex-shrink: 0;
  user-select: none;
}
.filter-chip-btn:hover {
  background: #E5E7EB;
  color: var(--text-primary);
}
.filter-chip-btn.active {
  background: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary);
  font-weight: 700;
}

.btn-del-cat {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.08);
  font-size: 0.5625rem;
  color: var(--text-secondary);
  margin-right: 2px;
  transition: var(--tr-fast);
}
.btn-del-cat:hover {
  background: var(--danger);
  color: #fff;
}

.filter-chip-btn.add-cat-btn {
  background: var(--primary-surface);
  color: var(--primary);
  border: 1px dashed var(--primary);
  font-weight: 700;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}

.product-admin-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lvl1);
  transition: var(--tr-fast);
  position: relative;
}
.product-admin-card:hover {
  border-color: var(--primary);
}
.product-admin-card.out-of-stock {
  border-color: var(--border-light);
  background: #FAFAFA;
}
.product-admin-card.out-of-stock .product-thumb-box img {
  filter: grayscale(85%);
  opacity: 0.6;
}

.product-thumb-box {
  width: 100%;
  aspect-ratio: 1 / 1.08;
  background: var(--bg-subtle);
  position: relative;
  overflow: hidden;
  cursor: pointer;
}
.product-thumb-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.badge-discount-tag {
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--danger);
  color: #fff;
  font-size: 0.625rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: var(--radius-xs);
}

.badge-photos-count {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(5, 15, 26, 0.7);
  color: #fff;
  font-size: 0.625rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.product-card-body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  flex: 1;
  justify-content: space-between;
}

.product-cat-tag {
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 2px;
  display: block;
}

.product-name-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.35;
  margin-bottom: 6px;
  min-height: 2.5em;
  cursor: pointer;
}

.card-sizes-strip {
  display: flex;
  gap: 3px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.size-mini-chip {
  font-size: 0.625rem;
  font-weight: 600;
  background: var(--bg-subtle);
  color: var(--text-secondary);
  padding: 1px 5px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border-light);
}

.product-price-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 10px;
}
.price-current {
  font-size: 0.9375rem;
  font-weight: 800;
  color: var(--text-primary);
}
.price-old {
  font-size: 0.6875rem;
  color: var(--text-dim);
  text-decoration: line-through;
}

.quick-controls-box {
  background: var(--bg-subtle);
  border-radius: var(--radius-sm);
  padding: 6px 8px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.stock-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: var(--radius-xs);
  font-size: 0.6875rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--tr-fast);
  flex: 1;
  justify-content: center;
}
.stock-toggle-btn.in-stock {
  background: var(--success-light);
  color: var(--success);
}
.stock-toggle-btn.out-stock {
  background: var(--danger-light);
  color: var(--danger);
}

.card-bottom-actions {
  display: flex;
  gap: 6px;
  border-top: 1px solid var(--border-light);
  padding-top: 8px;
}

.btn-card-action {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 6px;
  border-radius: var(--radius-xs);
  font-size: 0.6875rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--tr-fast);
}
.btn-card-action.edit {
  background: var(--bg-subtle);
  color: var(--text-primary);
}
.btn-card-action.edit:hover {
  background: var(--primary-light);
  color: var(--primary);
}
.btn-card-action.delete {
  background: transparent;
  color: var(--neutral);
}
.btn-card-action.delete:hover {
  background: var(--danger-light);
  color: var(--danger);
}

/* ==========================================================================
   4. TAB 2: ORDERS VIEW
   ========================================================================== */
.orders-list-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.order-item-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  box-shadow: var(--shadow-lvl1);
  transition: var(--tr-fast);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.order-item-card:hover {
  border-color: var(--primary);
}

.order-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 10px;
  flex-wrap: wrap;
  gap: 8px;
}
.order-code-badge {
  font-size: 0.8125rem;
  font-weight: 800;
  color: var(--primary);
}
.order-date-text {
  font-size: 0.6875rem;
  color: var(--text-dim);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.order-status-chip {
  padding: 3px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.6875rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.order-status-chip.pending { background: var(--warning-light); color: var(--warning); }
.order-status-chip.shipped { background: var(--primary-light); color: var(--primary); }
.order-status-chip.completed { background: var(--success-light); color: var(--success); }
.order-status-chip.canceled { background: var(--danger-light); color: var(--danger); }

.order-customer-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 0.8125rem;
  color: var(--text-primary);
}
.order-customer-info b {
  font-weight: 700;
}
.order-customer-info span {
  color: var(--text-secondary);
  font-size: 0.75rem;
}

.order-items-preview-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-subtle);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  overflow-x: auto;
}
.order-thumb-mini {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-xs);
  object-fit: cover;
  border: 1px solid var(--border-light);
  flex-shrink: 0;
}
.order-items-summary {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-primary);
  flex: 1;
}

.order-footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
.order-total-price {
  font-size: 0.9375rem;
  font-weight: 800;
  color: var(--text-primary);
}

.btn-order-status-action {
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.6875rem;
  font-weight: 700;
  background: var(--primary-light);
  color: var(--primary);
  cursor: pointer;
  transition: var(--tr-fast);
}
.btn-order-status-action:hover {
  background: var(--primary);
  color: #fff;
}

/* ==========================================================================
   5. TAB 3: CUSTOMERS CRM VIEW (Fixed overflow & alignment)
   ========================================================================== */
.customers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.customer-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 14px;
  box-shadow: var(--shadow-lvl1);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: var(--tr-fast);
}
.customer-card:hover {
  border-color: var(--primary);
}

.customer-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.customer-info-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.customer-avatar {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.9375rem;
  flex-shrink: 0;
}

.customer-title-block {
  min-width: 0;
}
.customer-title-block h4 {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.customer-title-block span {
  font-size: 0.6875rem;
  color: var(--text-secondary);
  display: block;
}

.customer-badge-pill {
  font-size: 0.625rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-xs);
  white-space: nowrap;
  flex-shrink: 0;
}
.customer-badge-pill.vip { background: var(--warning-light); color: var(--warning); border: 1px solid #FDE68A; }
.customer-badge-pill.new { background: var(--success-light); color: var(--success); border: 1px solid #A7F3D0; }
.customer-badge-pill.regular { background: var(--primary-light); color: var(--primary); border: 1px solid #C7D2FE; }

.customer-stats-strip {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--bg-subtle);
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  text-align: center;
  gap: 6px;
}
.customer-stats-strip div span {
  font-size: 0.625rem;
  color: var(--text-secondary);
  display: block;
}
.customer-stats-strip div b {
  font-size: 0.8125rem;
  font-weight: 800;
  color: var(--text-primary);
}

.customer-contact-btn {
  background: var(--bg-subtle);
  color: var(--text-primary);
  padding: 7px 12px;
  border-radius: var(--radius-xs);
  font-size: 0.75rem;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: var(--tr-fast);
  border: 1px solid var(--border-light);
}
.customer-contact-btn:hover {
  background: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary);
}

/* ==========================================================================
   6. TAB 4: SHOP PROFILE & SETTINGS (Custom Logo Upload / Remove)
   ========================================================================== */
.settings-container-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  max-width: 720px;
  margin: 0 auto;
}

.settings-card-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-lvl1);
}

.settings-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-light);
}
.settings-card-header h3 {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-primary);
}
.settings-card-header svg {
  color: var(--primary);
}

/* Logo Uploader Area */
.shop-logo-upload-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  padding: 12px;
  background: var(--bg-subtle);
  border-radius: var(--radius-md);
}
.shop-logo-preview-box {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-md);
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 800;
  overflow: hidden;
  border: 1px solid var(--border-card);
  flex-shrink: 0;
}
.shop-logo-preview-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.shop-logo-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.btn-upload-logo {
  padding: 6px 14px;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.btn-remove-logo {
  padding: 4px 10px;
  background: transparent;
  color: var(--danger);
  border-radius: var(--radius-sm);
  font-size: 0.6875rem;
  font-weight: 700;
  cursor: pointer;
  text-align: right;
}

.store-status-toggle-card {
  background: var(--success-light);
  border: 1px solid #BBF7D0;
  border-radius: var(--radius-md);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.store-status-toggle-card.closed {
  background: var(--danger-light);
  border-color: #FECACA;
}

.form-group-item {
  margin-bottom: 14px;
}
.form-group-item label {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text-primary);
  display: block;
  margin-bottom: 5px;
}

.text-input-field {
  width: 100%;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  transition: var(--tr-fast);
}
.text-input-field:focus {
  background: #fff;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 82, 255, 0.12);
}

.textarea-field {
  width: 100%;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-primary);
  min-height: 64px;
  resize: vertical;
  transition: var(--tr-fast);
  line-height: 1.5;
}
.textarea-field:focus {
  background: #fff;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 82, 255, 0.12);
}

.btn-save-settings {
  background: var(--primary);
  color: #fff;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-size: 0.9375rem;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: var(--tr-fast);
  width: 100%;
}
.btn-save-settings:hover {
  background: var(--primary-hover);
}

/* ==========================================================================
   7. MOBILE BOTTOM NAVIGATION (Line Icons)
   ========================================================================== */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--border-light);
  z-index: 90;
  justify-content: space-around;
  align-items: center;
  padding: 0 4px;
  box-shadow: 0 -2px 10px rgba(5, 15, 26, 0.04);
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--text-dim);
  font-size: 0.6875rem;
  font-weight: 600;
  cursor: pointer;
  position: relative;
  flex: 1;
  padding: 6px 0;
  transition: var(--tr-fast);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.bottom-nav-item svg {
  width: 20px;
  height: 20px;
  transition: var(--tr-fast);
}

.bottom-nav-item.active {
  color: var(--primary);
  font-weight: 800;
}
.bottom-nav-item.active svg {
  color: var(--primary);
}

.bottom-badge-dot {
  position: absolute;
  top: 4px;
  left: calc(50% + 6px);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--warning);
}

/* ==========================================================================
   8. MODALS & TOAST
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(5, 15, 26, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-dialog-card {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-lvl3);
  transform: translateY(12px) scale(0.98);
  transition: var(--tr-smooth);
}
.modal-backdrop.open .modal-dialog-card {
  transform: translateY(0) scale(1);
}

.modal-header-bar {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-header-bar h2 {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-primary);
}
.btn-close-modal {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-subtle);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  cursor: pointer;
}

.modal-form-body {
  padding: 18px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.multi-photos-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 8px;
  margin-top: 6px;
}

.gallery-photo-item {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border-light);
  background: var(--bg-subtle);
}
.gallery-photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.btn-del-photo {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(223, 41, 53, 0.9);
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.cover-badge-mini {
  position: absolute;
  bottom: 3px;
  right: 3px;
  background: var(--primary);
  color: #fff;
  font-size: 0.5rem;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 2px;
}

.add-photo-dropzone {
  border: 1px dashed var(--primary);
  background: var(--primary-surface);
  border-radius: var(--radius-sm);
  aspect-ratio: 1 / 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--primary);
  text-align: center;
  padding: 6px;
}
.add-photo-dropzone span {
  font-size: 0.625rem;
  font-weight: 700;
  margin-top: 2px;
}

.cat-chips-selector, .sizes-chips-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.cat-select-pill, .size-toggle-pill {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--bg-subtle);
  color: var(--text-secondary);
  border: 1px solid var(--border-light);
  cursor: pointer;
  transition: var(--tr-fast);
}
.cat-select-pill.selected, .size-toggle-pill.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.discount-pills-row {
  display: flex;
  gap: 6px;
  margin-top: 6px;
  flex-wrap: wrap;
}
.discount-pill-btn {
  padding: 5px 10px;
  border-radius: var(--radius-xs);
  font-size: 0.6875rem;
  font-weight: 700;
  background: var(--bg-subtle);
  color: var(--text-secondary);
  cursor: pointer;
  border: 1px solid var(--border-light);
}
.discount-pill-btn.active {
  background: var(--danger-light);
  color: var(--danger);
  border-color: var(--danger);
}

.persian-price-helper {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-light);
  padding: 4px 10px;
  border-radius: var(--radius-xs);
  margin-top: 4px;
  display: block;
}

.modal-stock-toggle-box {
  background: var(--success-light);
  border: 1px solid #BBF7D0;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-footer-bar {
  padding: 12px 18px;
  border-top: 1px solid var(--border-light);
  display: flex;
  gap: 10px;
}
.btn-save-product {
  flex: 2;
  background: var(--primary);
  color: #fff;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-size: 0.9375rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.btn-cancel-modal {
  flex: 1;
  background: var(--bg-subtle);
  color: var(--text-secondary);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 0.8125rem;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
}

.empty-state-box {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px 16px;
  background: var(--bg-subtle);
  border-radius: var(--radius-lg);
  border: 1px dashed var(--border-card);
}
.empty-state-box h3 {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text-primary);
}

.toast-banner {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--text-primary);
  color: #fff;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-size: 0.8125rem;
  font-weight: 600;
  box-shadow: var(--shadow-lvl3);
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 200;
  transform: translateY(80px);
  opacity: 0;
  transition: var(--tr-smooth);
}
.toast-banner.show {
  transform: translateY(0);
  opacity: 1;
}

/* ==========================================================================
   9. MOBILE RESPONSIVE TWEAKS (No overflow, flawless 2-col cards)
   ========================================================================== */
@media (max-width: 900px) {
  .app-sidebar {
    display: none;
  }
  .app-main-content {
    margin-right: 0;
    width: 100%;
    max-width: 100vw;
    padding-bottom: 64px;
  }
  .mobile-bottom-nav {
    display: flex;
  }
  .container {
    padding: 0 12px;
  }
  .header-inner {
    height: 58px;
    gap: 8px;
  }
  .current-tab-title-box h1 {
    font-size: 1rem;
  }
  .current-tab-title-box p {
    display: none;
  }
  .btn-add-primary {
    padding: 6px 12px;
    font-size: 0.75rem;
  }
  .quick-stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .stat-card {
    padding: 10px 12px;
  }
  .stat-info b {
    font-size: 1.15rem;
  }
  .stat-icon-wrap {
    width: 32px;
    height: 32px;
  }
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .product-thumb-box {
    aspect-ratio: 1 / 1.15;
  }
  .product-card-body {
    padding: 8px;
  }
  .product-name-title {
    font-size: 0.75rem;
    min-height: 2.3em;
  }
  .price-current {
    font-size: 0.8125rem;
  }
  .stock-toggle-btn {
    padding: 3px 6px;
    font-size: 0.625rem;
  }
  .customers-grid {
    grid-template-columns: 1fr;
  }
  .toast-banner {
    bottom: 70px;
    right: 12px;
    left: 12px;
    justify-content: center;
  }
}
