/* --- Starline Ultra-Modern Design System --- */

html {
  color-scheme: light;
}

:root {
  color-scheme: light;
  --bg-app: #eef2f6;
  --bg-card: rgba(255, 255, 255, 0.95);
  --bg-card-hover: #ffffff;
  --border-color: rgba(226, 232, 240, 0.8);
  --border-color-hover: rgba(203, 213, 225, 0.9);

  --accent-lime: #e2f952;
  --accent-lime-hover: #d4f238;
  --accent-lime-text: #0f172a;

  --primary: #0f172a;
  --primary-hover: #1e293b;
  --primary-brand: #4f46e5;

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;

  --font-display: 'Outfit', 'Inter', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'Inter', system-ui, -apple-system, sans-serif;
}

.font-code, .font-mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1, "zero" 0;
}

body {
  background: radial-gradient(1200px 900px at 15% 15%, rgba(224, 231, 248, 0.7) 0%, rgba(245, 247, 251, 0.95) 45%, rgba(228, 233, 245, 0.8) 100%), #eef2f6 !important;
  color: var(--text-primary);
  font-family: var(--font-body);
  overflow-x: hidden;
  min-height: 100vh;
  letter-spacing: -0.01em;
}

/* Starline Soft Matte Glass Panels */
.starline-glass {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 10px 35px -10px rgba(15, 23, 42, 0.04);
}

.starline-card {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: 26px;
  box-shadow: 0 12px 40px -10px rgba(15, 23, 42, 0.04), 0 1px 3px rgba(0, 0, 0, 0.02);
}

/* Starline Signature Active Highlight (Neon Chartreuse) */
.nav-item-active {
  background-color: var(--accent-lime) !important;
  color: var(--accent-lime-text) !important;
  font-weight: 800 !important;
  box-shadow: 0 4px 14px -3px rgba(226, 249, 82, 0.6) !important;
}

.nav-item-inactive {
  color: #4b5563 !important;
  font-weight: 500 !important;
}

.nav-item-inactive:hover {
  background-color: rgba(255, 255, 255, 0.75) !important;
  color: #0f172a !important;
}

/* Category Sub-Tabs */
.category-tab-btn {
  padding: 6px 16px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  transition: all 0.15s ease;
  cursor: pointer;
}

.category-tab-btn.active,
.filter-tab-pill.active {
  background-color: #ffffff !important;
  color: #0f172a !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03) !important;
}

.category-tab-btn:hover:not(.active),
.filter-tab-pill:hover:not(.active) {
  color: #0f172a;
}

/* Material Symbols Rendering */
.material-symbols-outlined {
  font-family: 'Material Symbols Outlined' !important;
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
  vertical-align: middle;
  user-select: none;
}

/* --- Reset & Defaults --- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.35) transparent;
}

/* Clean Minimal Scrollbar (Light Modern Design) */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

::-webkit-scrollbar-track {
  background: transparent !important;
}

::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.35) !important;
  border-radius: 9999px !important;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(100, 116, 139, 0.6) !important;
}

.custom-scrollbar {
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.35) transparent;
}

.custom-scrollbar::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

.custom-scrollbar::-webkit-scrollbar-track {
  background: transparent !important;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.35) !important;
  border-radius: 9999px !important;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: rgba(100, 116, 139, 0.6) !important;
}

/* --- Layout Structure --- */
.app-container {
  display: flex;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
}

/* Sidebar Styling */
.sidebar {
  width: var(--sidebar-width);
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  z-index: 10;
}

.sidebar-header {
  height: var(--header-height);
  display: flex;
  align-items: center;
  padding: 0 24px;
  border-bottom: 1px solid var(--border-color);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.5px;
  color: var(--text-primary);
}

.logo-icon {
  width: 28px;
  height: 28px;
  color: var(--primary);
  filter: drop-shadow(0 0 6px rgba(99, 102, 241, 0.4));
}

.logo span {
  color: var(--primary);
}

.sidebar-nav {
  flex: 1;
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 15px;
  text-align: left;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-item:hover {
  background-color: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
}

.nav-item.active {
  background-color: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.15);
  color: var(--primary-light);
  box-shadow: inset 0 0 8px rgba(99, 102, 241, 0.05);
}

.nav-icon {
  width: 18px;
  height: 18px;
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--border-color);
}

.shop-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  background-color: rgba(255, 255, 255, 0.03);
  padding: 10px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.shop-avatar {
  width: 36px;
  height: 36px;
  border-radius: 9999px;
  background-color: #f8fafc;
  border: 1px solid #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 500;
  color: #334155;
}

.shop-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.shop-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shop-sub {
  font-size: 11px;
  color: var(--text-muted);
}

/* Main Content Styling */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100vh;
  position: relative;
  overflow: hidden;
}

.main-header {
  height: var(--header-height);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  background-color: rgba(8, 12, 20, 0.4);
  backdrop-filter: blur(10px);
  z-index: 5;
}

#page-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.api-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  background-color: rgba(255, 255, 255, 0.03);
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid var(--border-color);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  box-shadow: 0 0 8px currentColor;
}

.status-dot.green {
  background-color: var(--success);
  color: var(--success);
}

/* Content Wrapper */
.content-wrapper {
  flex: 1;
  overflow-y: auto;
  padding: 32px;
}

.tab-panel {
  display: none;
  animation: fadeIn 0.4s ease forwards;
}

.tab-panel.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Cards & Containers --- */
.card {
  background-color: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.card:hover {
  border-color: var(--border-color-hover);
}

.card-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.card-header-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.card-header-flex .card-title {
  margin-bottom: 0;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 14px;
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-icon {
  width: 16px;
  height: 16px;
}

.btn-primary {
  background-color: var(--primary);
  color: white;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.5);
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: rgba(255, 255, 255, 0.05);
  border-color: var(--border-color);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: var(--border-color-hover);
}

.btn-text {
  background: none;
  border: none;
  color: var(--primary-light);
  padding: 4px 8px;
}

.btn-text:hover {
  color: white;
  background-color: rgba(255, 255, 255, 0.05);
}

.btn-sm {
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 6px;
}

.btn-block {
  width: 100%;
}

/* --- Metrics Grid --- */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

.metric-card {
  background-color: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

.metric-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.metric-icon svg {
  width: 22px;
  height: 22px;
}

.metric-icon.blue {
  background-color: rgba(99, 102, 241, 0.1);
  color: var(--primary-light);
  border: 1px solid rgba(99, 102, 241, 0.2);
}

.metric-icon.green {
  background-color: rgba(16, 185, 129, 0.1);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.metric-icon.yellow {
  background-color: rgba(245, 158, 11, 0.1);
  color: var(--warning);
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.metric-icon.red {
  background-color: rgba(239, 68, 68, 0.1);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.metric-content {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.metric-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.metric-value {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 4px 0;
  letter-spacing: -0.5px;
}

.metric-desc {
  font-size: 11px;
  color: var(--text-muted);
}

/* --- Charts Row --- */
.charts-row {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  margin-bottom: 32px;
}

@media (max-width: 1024px) {
  .charts-row {
    grid-template-columns: 1fr;
  }
}

.chart-container {
  display: flex;
  flex-direction: column;
  height: 380px;
}

.chart-wrapper {
  position: relative;
  flex: 1;
  width: 100%;
  height: 100%;
}

/* --- Tables & Data Grids --- */
.table-container {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.data-table th {
  padding: 14px 16px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  color: var(--text-secondary);
  border-bottom: 2px solid var(--border-color);
  background-color: rgba(255, 255, 255, 0.01);
}

.data-table td {
  padding: 14px 16px;
  font-size: 14px;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
}

.data-table tbody tr {
  transition: background-color 0.2s ease;
}

.data-table tbody tr:hover {
  background-color: rgba(255, 255, 255, 0.02);
}

/* Status Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-success {
  background-color: var(--success-bg);
  color: var(--success);
  border: 1px solid var(--success-border);
}

.badge-danger {
  background-color: var(--danger-bg);
  color: var(--danger);
  border: 1px solid var(--danger-border);
}

.badge-warning {
  background-color: var(--warning-bg);
  color: var(--warning);
  border: 1px solid var(--warning-border);
}

.badge-secondary {
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

/* ==========================================================
   Modern Capsule Status Badges (Add, Added, Waiting, Accepted, Declined)
   ========================================================== */
.ui-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 4px 10px 4px 6px;
  border-radius: 9999px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.01em;
  white-space: nowrap;
  user-select: none;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.ui-badge-lg {
  gap: 8px;
  padding: 6px 14px 6px 8px;
  font-size: 13.5px;
}

.ui-badge-sm {
  gap: 5px;
  padding: 3px 8px 3px 5px;
  font-size: 11px;
}

.ui-badge-icon {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.18s ease;
}

.ui-badge-lg .ui-badge-icon {
  width: 20px;
  height: 20px;
}

.ui-badge-sm .ui-badge-icon {
  width: 14px;
  height: 14px;
}

/* 1. Add (Neutral / Actionable) */
.ui-badge-add {
  background-color: #f1f4f8;
  color: #334155;
  border: 1px solid rgba(226, 232, 240, 0.8);
}
button.ui-badge-add,
a.ui-badge-add {
  cursor: pointer;
}
button.ui-badge-add:hover,
a.ui-badge-add:hover {
  background-color: #e2e8f0;
  color: #0f172a;
}
.ui-badge-add .ui-badge-icon {
  background-color: #94a3b8;
  color: #ffffff;
}

/* 2. Added (Active / Primary Selected) */
.ui-badge-added {
  background-color: #007aff;
  color: #ffffff;
  box-shadow: 0 2px 6px -1px rgba(0, 122, 255, 0.32);
}
.ui-badge-added .ui-badge-icon {
  background-color: #ffffff;
  color: #007aff;
}

/* 3. Waiting (Pending / In Progress) */
.ui-badge-waiting {
  background-color: #fff4ea;
  color: #f5842c;
  border: 1px solid rgba(254, 215, 170, 0.4);
}
.ui-badge-waiting .ui-badge-icon {
  background-color: #f5842c;
  color: #ffffff;
}

/* 4. Accepted (Success / Active / Ulangan) */
.ui-badge-accepted {
  background-color: #eafaf0;
  color: #2cb563;
  border: 1px solid rgba(187, 247, 208, 0.4);
}
.ui-badge-accepted .ui-badge-icon {
  background-color: #2cb563;
  color: #ffffff;
}

/* 5. Declined (Error / Rejected) */
.ui-badge-declined {
  background-color: #fdeeee;
  color: #e75751;
  border: 1px solid rgba(254, 205, 211, 0.4);
}
.ui-badge-declined .ui-badge-icon {
  background-color: #e75751;
  color: #ffffff;
}

/* ==========================================================
   Listing / Duplication Table Status Pills
   Matching modern capsule design aesthetic (clean, crisp, without heavy icons)
   ========================================================== */
.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3.5px 11px;
  border-radius: 9999px;
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.01em;
  white-space: nowrap;
  user-select: none;
  transition: all 0.15s ease;
}

/* In Stock / Sotuvda (Matches 'Accepted' mint green theme) */
.status-pill-instock,
.status-pill-success {
  background-color: #eafaf0;
  color: #2cb563;
  border: 1px solid rgba(187, 247, 208, 0.45);
}

/* Warning / VGX yo'q (Matches 'Waiting' warm peach theme) */
.status-pill-novgx,
.status-pill-warning {
  background-color: #fff4ea;
  color: #f5842c;
  border: 1px solid rgba(254, 215, 170, 0.45);
}

/* Archived / Arxivda (Matches neutral cool slate theme) */
.status-pill-archived,
.status-pill-neutral {
  background-color: #f1f4f8;
  color: #475569;
  border: 1px solid rgba(226, 232, 240, 0.85);
}

/* Out of Stock / Tugagan (Matches 'Declined' soft rose theme) */
.status-pill-outofstock,
.status-pill-danger {
  background-color: #fdeeee;
  color: #e75751;
  border: 1px solid rgba(254, 205, 211, 0.45);
}

/* Primary / Tanlangan (Matches 'Added' electric blue theme) */
.status-pill-primary {
  background-color: #007aff;
  color: #ffffff;
  box-shadow: 0 2px 6px -1px rgba(0, 122, 255, 0.28);
}

/* Mini layouts for split tables */
.dashboard-tables-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

@media (max-width: 900px) {
  .dashboard-tables-grid {
    grid-template-columns: 1fr;
  }
}

.table-container.minimal td,
.table-container.minimal th {
  padding: 10px 12px;
  font-size: 13px;
}

/* --- Toolbar Controls --- */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.search-box {
  position: relative;
  flex: 1;
  min-width: 250px;
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-muted);
}

.search-box input {
  width: 100%;
  height: 40px;
  background-color: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0 16px 0 44px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 14px;
  transition: all 0.2s ease;
}

.search-box input:focus {
  outline: none;
  background-color: rgba(255, 255, 255, 0.06);
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.filter-group label {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
}

.form-select {
  height: 40px;
  background-color: rgba(20, 26, 42, 0.9);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0 32px 0 16px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 14px;
  cursor: pointer;
  transition: border-color 0.2s ease;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%239ca3af'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
}

.form-select:focus {
  outline: none;
  border-color: var(--primary);
}

/* --- Catalog Grid/Cards --- */
.catalog-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.product-row-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
}

.product-row-card:hover {
  border-color: var(--border-color-hover);
}

.product-summary {
  display: flex;
  align-items: center;
  padding: 20px;
  gap: 20px;
  cursor: pointer;
  user-select: none;
}

.product-img-wrapper {
  width: 70px;
  height: 70px;
  border-radius: 8px;
  overflow: hidden;
  background-color: rgba(255, 255, 255, 0.02);
  flex-shrink: 0;
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
}

.product-main-details {
  flex: 1;
  min-width: 0;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 16px;
  align-items: center;
}

@media (max-width: 768px) {
  .product-main-details {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

.product-title-group {
  min-width: 0;
}

.prod-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.prod-category {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

.prod-stat-group {
  display: flex;
  flex-direction: column;
}

.prod-stat-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
}

.prod-stat-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 2px;
}

.prod-price-value {
  font-size: 15px;
  font-weight: 700;
  color: var(--primary-light);
}

.expand-indicator {
  width: 24px;
  height: 24px;
  color: var(--text-muted);
  transition: transform 0.2s ease;
}

.product-row-card.expanded .expand-indicator {
  transform: rotate(180deg);
}

/* Expanded SKU list container */
.product-skus-container {
  display: none;
  background-color: rgba(0, 0, 0, 0.25);
  border-top: 1px solid var(--border-color);
  padding: 16px 20px 20px 20px;
}

.product-row-card.expanded .product-skus-container {
  display: block;
}

.skus-title {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  margin-bottom: 12px;
  letter-spacing: 0.5px;
}

.sku-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-radius: 8px;
  background-color: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  margin-bottom: 8px;
  gap: 16px;
  flex-wrap: wrap;
}

.sku-item:last-child {
  margin-bottom: 0;
}

.sku-info-box {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 200px;
}

.sku-preview-img {
  width: 40px;
  height: 40px;
  border-radius: 4px;
  object-fit: cover;
  border: 1px solid var(--border-color);
}

.sku-meta {
  display: flex;
  flex-direction: column;
}

.sku-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.sku-barcode {
  font-size: 11px;
  color: var(--text-muted);
}

.sku-ikpu {
  font-size: 11px;
  color: var(--text-muted);
}

.sku-stats-row {
  display: flex;
  gap: 24px;
}

.sku-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Pagination container spacing */
.pagination-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 32px;
}

#catalog-page-indicator {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
}

/* --- Printer Grid Layout --- */
.printer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
}

@media (max-width: 900px) {
  .printer-grid {
    grid-template-columns: 1fr;
  }
}

.printer-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-input {
  height: 40px;
  background-color: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0 16px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 14px;
  transition: all 0.2s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
}

.field-hint {
  font-size: 11px;
  color: var(--text-muted);
}

.printer-preview-box {
  background-color: #0b0e14;
  border: 1px dashed rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.preview-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  text-align: center;
  color: var(--text-muted);
  max-width: 320px;
}

.preview-placeholder-icon {
  width: 48px;
  height: 48px;
  opacity: 0.3;
}

.preview-placeholder span {
  font-size: 13px;
  line-height: 1.5;
}

/* Simulated label preview box */
.label-preview-content {
  background-color: white;
  color: black;
  padding: 16px;
  border-radius: 4px;
  width: 240px;
  height: 150px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  font-family: monospace;
}

.label-header {
  font-size: 9px;
  font-weight: 700;
  border-bottom: 1px solid black;
  padding-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.label-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  padding: 8px 0;
}

.label-barcode-lines {
  height: 45px;
  width: 100%;
  background: repeating-linear-gradient(90deg,
      black,
      black 2px,
      white 2px,
      white 6px);
  margin-bottom: 4px;
}

.label-barcode-text {
  font-size: 10px;
  letter-spacing: 2px;
  font-weight: 700;
}

.label-footer {
  display: flex;
  justify-content: space-between;
  font-size: 8px;
  border-top: 1px solid black;
  padding-top: 4px;
}

/* --- Modals --- */
.modal {
  position: fixed;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal.active {
  display: flex;
  opacity: 1;
}

.modal-dialog {
  width: 100%;
  max-width: 550px;
  padding: 20px;
  transform: translateY(-24px);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal.active .modal-dialog {
  transform: translateY(0);
}

.modal-content {
  background-color: var(--bg-sidebar);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
}

.close-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s ease;
}

.close-btn:hover {
  color: white;
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  max-height: 70vh;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  background-color: rgba(0, 0, 0, 0.15);
}

.modal-product-summary {
  display: flex;
  gap: 16px;
  padding: 12px;
  background-color: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  margin-bottom: 24px;
}

.modal-prod-img-wrapper {
  width: 50px;
  height: 50px;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-prod-img-wrapper img {
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
}

.modal-prod-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.modal-prod-info h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.modal-prod-info p {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

/* Alert styles */
.alert {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 13px;
  margin-top: 20px;
  border: 1px solid transparent;
}

.alert-danger {
  background-color: var(--danger-bg);
  color: var(--danger);
  border-color: var(--danger-border);
}

.alert-success {
  background-color: var(--success-bg);
  color: var(--success);
  border-color: var(--success-border);
}

/* --- Side Drawer Details --- */
.drawer {
  position: fixed;
  right: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  display: none;
  z-index: 90;
  justify-content: flex-end;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.drawer.active {
  display: flex;
  opacity: 1;
}

.drawer-content {
  width: 100%;
  max-width: 600px;
  background-color: var(--bg-sidebar);
  border-left: 1px solid var(--border-color);
  height: 100%;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.5);
}

.drawer.active .drawer-content {
  transform: translateX(0);
}

.drawer-header {
  padding: 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.drawer-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
}

.drawer-close-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 28px;
  cursor: pointer;
  line-height: 1;
}

.drawer-close-btn:hover {
  color: white;
}

.drawer-body {
  padding: 24px;
  flex: 1;
  overflow-y: auto;
}

.drawer-section-title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  margin-top: 32px;
  margin-bottom: 16px;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 8px;
}

.drawer-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.meta-item {
  background-color: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  padding: 12px 16px;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
}

.meta-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
}

.meta-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 4px;
}

/* --- Loading Spinner overlay --- */
.loading-overlay {
  position: fixed;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(8, 12, 20, 0.85);
  backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.loading-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 3px solid rgba(99, 102, 241, 0.1);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s infinite linear;
}

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

.loading-text {
  margin-top: 20px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 500;
  color: var(--text-secondary);
}

.drawer-prod-img {
  width: 36px;
  height: 36px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--border-color);
}

.flex-center {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* --- Listing Transfer Workspace --- */
.transfer-workspace-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

@media (max-width: 992px) {
  .transfer-workspace-grid {
    grid-template-columns: 1fr;
  }
}

.sku-table-mini-wrapper {
  margin-top: 10px;
}

.transfer-logs-container {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

.transfer-logs-container::-webkit-scrollbar {
  width: 6px;
}

.transfer-logs-container::-webkit-scrollbar-thumb {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

/* --- Batch Listing Transfer Redesign --- */
.product-row-card.selected {
  background-color: rgba(13, 148, 136, 0.04) !important;
  box-shadow: 0 4px 20px rgba(13, 148, 136, 0.15) !important;
}

/* Pagination container */
.pagination-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-top: 32px;
}

#transfer-page-indicator {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

/* Slide out drawer styles */
.drawer {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Spinner small */
.spinner-small {
  animation: spin 1s infinite linear;
}

/* --- Disabled Transfer Cards --- */
.product-row-card.disabled-transfer {
  opacity: 0.55;
  cursor: not-allowed !important;
  border-color: rgba(239, 68, 68, 0.15) !important;
}

.product-row-card.disabled-transfer .product-card-checkbox {
  cursor: not-allowed !important;
  opacity: 0.5;
}

.badge-transfer-warning {
  background-color: rgba(245, 158, 11, 0.1);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.25);
  font-size: 10px;
  font-weight: 600;
  padding: 3px 6px;
  border-radius: 4px;
  margin-top: 4px;
  display: inline-block;
}

/* --- Server Log Console Line Styles --- */
.log-line {
  padding: 2px 0;
  line-height: 1.45;
  word-break: break-word;
}
.log-line.info {
  color: #94a3b8;
}
.log-line.server {
  color: #38bdf8;
}
.log-line.success {
  color: #34d399;
  font-weight: 600;
}
.log-line.error {
  color: #f87171;
  font-weight: 600;
}
.log-line.warning {
  color: #fbbf24;
}

/* ==========================================================================
   Table Linear Indeterminate Progress Bar (Starline Design)
   ========================================================================== */
.table-linear-loader {
  position: relative;
  width: 100%;
  height: 3px;
  background-color: #f1f5f9; /* faint slate track (bg-slate-100) */
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s ease, visibility 0.15s ease;
  z-index: 25;
  margin-bottom: -3px; /* Seamless overlay on border without layout shifting */
}

.table-linear-loader.active {
  opacity: 1;
  visibility: visible;
}

.table-linear-loader-track {
  position: relative;
  width: 100%;
  height: 100%;
  background-color: #f1f5f9; /* bg-slate-100 */
  overflow: hidden;
}

.table-linear-loader-bar {
  position: absolute;
  top: 0;
  bottom: 0;
  height: 100%;
  border-radius: 9999px;
  background-color: #E4F94E; /* Neon-yellow brand accent */
  box-shadow: 0 0 10px rgba(228, 249, 78, 0.9), 0 0 3px rgba(228, 249, 78, 0.6);
}

.table-linear-loader-bar.bar-1 {
  animation: table-linear-anim-1 1.8s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;
}

.table-linear-loader-bar.bar-2 {
  animation: table-linear-anim-2 1.8s cubic-bezier(0.165, 0.84, 0.44, 1) 0.85s infinite;
}

@keyframes table-linear-anim-1 {
  0% {
    left: -35%;
    right: 100%;
  }
  60% {
    left: 100%;
    right: -90%;
  }
  100% {
    left: 100%;
    right: -90%;
  }
}

@keyframes table-linear-anim-2 {
  0% {
    left: -200%;
    right: 100%;
  }
  60% {
    left: 107%;
    right: -8%;
  }
  100% {
    left: 107%;
    right: -8%;
  }
}

/* Subtle dimming of table body rows during background updates */
.cabinet-table-updating {
  opacity: 0.68;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

/* Top Progress Bar Support */
#top-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 2.5px;
  width: 0%;
  background: #E4F94E;
  box-shadow: 0 0 8px rgba(228, 249, 78, 0.8);
  z-index: 99999;
  transition: width 0.2s ease, opacity 0.3s ease;
  opacity: 0;
  pointer-events: none;
}

#top-progress-bar.active {
  opacity: 1;
}

#top-progress-bar.finished {
  opacity: 0;
}

/* ==========================================================================
   Modern Vertical Store Cards (Pinterest / Meetmax Style Grid)
   ========================================================================== */
.store-vertical-card {
  position: relative;
  background-color: #ffffff;
  border-radius: 20px;
  border: 1px solid rgba(226, 232, 240, 0.85);
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.02), 0 1px 2px -1px rgba(0, 0, 0, 0.02);
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.store-vertical-card:hover {
  transform: translateY(-2px);
  border-color: rgba(203, 213, 225, 0.95);
  box-shadow: 0 12px 24px -6px rgba(15, 23, 42, 0.06), 0 4px 8px -4px rgba(15, 23, 42, 0.03);
}

.store-menu-dropdown {
  transform-origin: top right;
}

.store-vertical-card:has(.store-menu-dropdown:not(.hidden)),
.store-vertical-card.z-30 {
  z-index: 50 !important;
}

/* Circular smooth gradient avatar orbs (Pinterest / Raycast Switcher style) */
#header-company-avatar,
#sidebar-company-avatar {
  background-size: cover;
  transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.18s ease;
}

#header-company-avatar:hover,
#sidebar-company-avatar:hover {
  transform: scale(1.05);
}