/* ==========================================================================
   DESIGN TOKENS & RESET (KIYIN BRAND: MODERN BLUE)
   ========================================================================== */
:root {
  /* Backgrounds */
  --bg: #F7F9FC;
  --bg-secondary: #F1F5F9;
  --bg-base: #F7F9FC;
  --bg-app: #F7F9FC;
  --bg-sidebar: #1E3A8A;

  /* Surfaces */
  --surface: #FFFFFF;
  --surface-elevated: #FFFFFF;
  --surface-hover: #F8FAFC;
  --surface-1: #FFFFFF;
  --surface-2: #F8FAFC;
  --surface-3: #F1F5F9;
  --bg-card: #FFFFFF;

  /* Borders */
  --border: #E2E8F0;
  --border-subtle: #F1F5F9;
  --border-strong: #C7D0DD;
  --border-focus: #2563EB;

  /* Primary Brand (Modern Blue) */
  --primary: #2563EB;
  --primary-hover: #1D4ED8;
  --primary-bright: #1D4ED8;
  --primary-dark: #1E3A8A;
  --primary-light: #EFF6FF;
  --primary-border: #DBEAFE;
  --emerald-primary: #2563EB;
  --emerald-hover: #1D4ED8;
  --emerald-highlight: #1D4ED8;
  --emerald-muted: rgba(37, 99, 235, 0.10);
  --emerald-muted-border: rgba(37, 99, 235, 0.25);

  /* Text */
  --text-primary: #111827;
  --text-secondary: #475569;
  --text-muted: #6B7280;
  --text-placeholder: #94A3B8;
  --text-disabled: #94A3B8;

  /* Status / Semantic */
  --success: #16A34A;
  --warning: #D97706;
  --danger: #DC2626;
  --info: #6366F1;

  --danger-base: #FEF2F2;
  --danger-border: #FECACA;
  --danger-text: #DC2626;
  --danger-muted: rgba(220, 38, 38, 0.10);

  --warning-base: #FFFBEB;
  --warning-border: #FCD34D;
  --warning-text: #D97706;
  --warning-muted: rgba(217, 119, 6, 0.10);

  /* Sidebar (deep navy anchor) */
  --sidebar-bg: #1E3A8A;
  --sidebar-bg-active: rgba(255, 255, 255, 0.14);
  --sidebar-bg-hover: rgba(255, 255, 255, 0.08);
  --sidebar-border: rgba(255, 255, 255, 0.12);
  --sidebar-text: rgba(255, 255, 255, 0.72);
  --sidebar-text-strong: #FFFFFF;
  --sidebar-icon: rgba(255, 255, 255, 0.60);
  --sidebar-accent: #60A5FA;

  /* Typography */
  --font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* Radii */
  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-lg: 12px;
  
  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.05), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 8px 20px rgba(15, 23, 42, 0.08);
  --shadow-modal: 0 24px 60px rgba(15, 23, 42, 0.18);
  --shadow-sidebar: 4px 0 24px rgba(15, 23, 42, 0.08);
  
  /* Layout */
  --sidebar-width: 260px;
  --topbar-height: 60px;
  --bottom-nav-height: 60px;
  --max-content-width: 1200px;
  
  /* Animation */
  --transition: 180ms ease-out;
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

ul {
  list-style: none;
}

button {
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
  color: inherit;
}

input, textarea, select {
  font-family: inherit;
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
}

.icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.logo {
  font-size: 1.1875rem;
  font-weight: 800;
  color: var(--primary-dark);
  letter-spacing: -0.02em;
}

.seller-tag {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--primary-hover);
  background: var(--primary-light);
  border: 1px solid var(--primary-border);
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  margin-left: 6px;
  vertical-align: middle;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}






.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-logo img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  display: block;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  padding: 4px;
}

.brand-logo .logo {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--sidebar-text-strong);
}






/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  transition: background-color var(--transition), border-color var(--transition), color var(--transition), box-shadow var(--transition);
  white-space: nowrap;
  border: 1px solid transparent;
}

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

.btn-primary {
  background-color: var(--primary);
  color: #FFFFFF;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
}

.btn-primary:hover:not(:disabled) {
  background-color: var(--primary-hover);
  box-shadow: 0 4px 10px rgba(29, 78, 216, 0.3);
}

.btn-primary:active:not(:disabled) {
  background-color: var(--primary-dark);
  box-shadow: none;
}

.btn-secondary {
  background-color: var(--surface);
  color: var(--text-secondary);
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover:not(:disabled) {
  background-color: var(--surface-hover);
  border-color: var(--border-strong);
  color: var(--text-primary);
}

.btn-outline {
  background-color: var(--surface);
  color: var(--primary-hover);
  border-color: var(--primary-border);
  font-weight: 600;
}

.btn-outline:hover:not(:disabled) {
  background-color: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary-dark);
}

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

.btn-ghost:hover:not(:disabled) {
  color: var(--text-primary);
  background-color: var(--surface-hover);
}

.btn-warning-outline {
  background-color: var(--surface);
  color: var(--warning);
  border-color: var(--warning-border);
}

.btn-warning-outline:hover:not(:disabled) {
  background-color: var(--warning-muted);
}

.btn-danger-outline {
  background-color: var(--surface);
  color: var(--danger);
  border-color: var(--danger-border);
}

.btn-danger-outline:hover:not(:disabled) {
  background-color: var(--danger-muted);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8125rem;
}

.btn-lg {
  padding: 10px 20px;
  font-size: 0.9375rem;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  transition: all var(--transition);
  border: 1px solid var(--border);
  background-color: var(--surface);
}

.icon-btn:hover {
  color: var(--text-primary);
  background-color: var(--surface-hover);
  border-color: var(--border-strong);
}

.bell-btn {
  position: relative;
}

.badge-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--primary);
  box-shadow: 0 0 0 2px var(--surface);
}

/* ==========================================================================
   MOBILE TOP BAR
   ========================================================================== */
.mobile-topbar {
  display: none;
  align-items: center;
  justify-content: space-between;
  height: var(--topbar-height);
  padding: 0 16px;
  background-color: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.03);
  position: sticky;
  top: 0;
  z-index: 60;
}

/* ==========================================================================
   SIDEBAR & LAYOUT SHELL
   ========================================================================== */
.app-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  background-color: var(--sidebar-bg);
  border-right: none;
  box-shadow: var(--shadow-sidebar);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 10;
}

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

.sidebar-brand {
  padding: 20px 24px;
  border-bottom: 1px solid var(--sidebar-border);
  display: flex;
  align-items: center;
} 

.sidebar-brand .seller-tag {
  display: none;
}

.sidebar-brand::after {
  display: none;
}


.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  color: var(--sidebar-text);
  font-size: 0.875rem;
  font-weight: 500;
  text-align: left;
  transition: all var(--transition);
  position: relative;
  background-color: transparent;
}

.nav-link .icon {
  color: var(--sidebar-icon);
  transition: color var(--transition);
}

.nav-link:hover {
  background-color: var(--sidebar-bg-hover);
  color: var(--sidebar-text-strong);
}

.nav-link:hover .icon {
  color: var(--sidebar-text-strong);
}

.nav-link.active {
  background-color: var(--sidebar-bg-active);
  color: var(--sidebar-text-strong);
  font-weight: 600;
}

.nav-link.active .icon {
  color: var(--sidebar-text-strong);
}

.nav-link.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 50%;
  width: 3px;
  background-color: var(--sidebar-accent);
  border-radius: 0 2px 2px 0;
}

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

.sidebar-store-mini {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  border-radius: var(--radius-sm);
  transition: background-color var(--transition);
}

.sidebar-store-mini:hover {
  background-color: var(--sidebar-bg-hover);
}

.sidebar-store-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  border: 1px solid var(--sidebar-border);
}

.sidebar-store-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--sidebar-text-strong);
}

.sidebar-store-sub {
  font-size: 0.75rem;
  color: var(--sidebar-text);
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(2px);
  z-index: 70;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}

.sidebar-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

/* ==========================================================================
   MAIN CONTENT
   ========================================================================== */
.main-content {
  flex: 1;
  min-width: 0;
  padding: 32px 40px 64px;
  max-width: var(--max-content-width);
  background-color: var(--bg);
}

.content-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.page-title {
  font-size: 1.625rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.025em;
}

.page-subtitle {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.header-actions-right {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.header-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  border: 1px solid var(--border-strong);
}

.view {
  display: none;
}

.view.active {
  display: block;
}

/* Status Banner overrides */
#statusBanner {
  border-radius: var(--radius-sm) !important;
  font-size: 0.875rem !important;
  padding: 12px 16px !important;
  margin-bottom: 24px !important;
  border: 1px solid var(--border) !important;
}

#statusBanner[style*="rgb(255, 247, 230)"], 
#statusBanner[style*="#fff7e6"] {
  background-color: var(--warning-base) !important;
  color: var(--warning-text) !important;
  border-color: var(--warning-border) !important;
}

#statusBanner[style*="rgb(253, 232, 232)"], 
#statusBanner[style*="#fde8e8"] {
  background-color: var(--danger-base) !important;
  color: var(--danger-text) !important;
  border-color: var(--danger-border) !important;
}

/* ==========================================================================
   TOOLBAR / SEARCH / FILTERS
   ========================================================================== */
.toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.search-bar {
  flex: 1;
  min-width: 260px;
  display: flex;
  align-items: center;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.search-bar:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.10);
}

.search-icon-svg {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
}

.search-input {
  border: none;
  background: transparent;
  outline: none;
  width: 100%;
  margin-left: 10px;
  font-size: 0.875rem;
  color: var(--text-primary);
}

.search-input::placeholder {
  color: var(--text-placeholder);
}

.filter-chips {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.chip-filter {
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
  background-color: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}

.chip-filter:hover {
  background-color: var(--surface-hover);
  border-color: var(--border-strong);
  color: var(--text-primary);
}

.chip-filter.active {
  background-color: var(--primary);
  border-color: var(--primary);
  color: #FFFFFF;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
}

.empty-state {
  text-align: center;
  color: var(--text-muted);
  padding: 64px 0;
  font-size: 0.875rem;
}

/* ==========================================================================
   PRODUCT CARDS & GRID
   ========================================================================== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.seller-product-card {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.seller-product-card:hover {
  border-color: var(--primary-border);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.seller-product-card.is-archived {
  opacity: 0.6;
}

.seller-product-card.is-archived .card-image-wrapper img {
  filter: grayscale(100%);
}

.card-image-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  background-color: var(--bg-secondary);
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

.card-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.discount-badge {
  position: absolute;
  left: 10px;
  bottom: 10px;
  background: #DC2626;
  color: #FFFFFF;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1;
  padding: 6px 9px;
  border-radius: 6px;
  letter-spacing: 0.01em;
  box-shadow: 0 2px 6px rgba(220, 38, 38, 0.25);
  z-index: 2;
} 

.archived-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background-color: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.6875rem;
  font-weight: 500;
  padding: 2px 6px;
  border-radius: 4px;
}

.card-info {
  padding: 16px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.product-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
  margin-bottom: 12px;
}

.price-section {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: auto;
}

.current-price {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text-primary);
}

.price-display {
  cursor: pointer;
  border-radius: 4px;
  padding: 2px 6px;
  margin-left: -6px;
  transition: background-color var(--transition);
  display: inline-block;
  width: fit-content;
}

.price-display:hover {
  background-color: var(--bg-secondary);
}

.old-price-wrapper {
  min-height: 16px;
}

.old-price {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-decoration: line-through;
}

/* Inline Price Edit */
.price-edit-active {
  display: flex;
  align-items: center;
  gap: 6px;
}

.price-edit-input {
  width: 90px;
  background-color: var(--surface);
  border: 1px solid var(--border-strong);
  color: var(--text-primary);
  border-radius: 4px;
  padding: 4px 6px;
  font-size: 0.875rem;
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.10);
}

.price-edit-input:focus {
  border-color: var(--primary);
}

.price-save-btn, .price-cancel-btn {
  width: 28px;
  height: 28px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  background-color: var(--surface);
  transition: all var(--transition);
}

.price-save-btn {
  color: var(--primary);
  background-color: var(--primary-light);
  border-color: rgba(37, 99, 235, 0.25);
}

.price-save-btn:hover {
  background-color: var(--primary);
  color: #FFFFFF;
}

.price-cancel-btn {
  color: var(--text-muted);
}

.price-cancel-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-strong);
  background-color: var(--bg-secondary);
}

.price-save-btn .icon, .price-cancel-btn .icon {
  width: 14px;
  height: 14px;
}

.card-seller-actions {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  background-color: var(--surface);
}

.card-seller-actions .btn {
  flex: 1;
}

/* ==========================================================================
   FORMS & PRODUCT FORMS
   ========================================================================== */
.form-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.btn-back {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background-color: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}

.btn-back:hover {
  background-color: var(--surface-hover);
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.form-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
}

.product-form, .profile-form {
  max-width: 720px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-section {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--primary-border);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.required {
  color: var(--primary);
}

.optional-label, .field-hint-inline {
  color: var(--text-muted);
  font-weight: 400;
}

.field-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 12px;
  margin-top: -4px;
}

.form-input, .form-textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.875rem;
  color: var(--text-primary);
  background-color: var(--surface);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-input:focus, .form-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.10);
}

.form-input::placeholder, .form-textarea::placeholder {
  color: var(--text-placeholder);
}

.form-textarea {
  resize: vertical;
  min-height: 100px;
}

/* Chip Select */
.chip-select-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip-select {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background-color: var(--surface);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}

.chip-select:hover {
  border-color: var(--border-strong);
  color: var(--text-primary);
  background-color: var(--surface-hover);
}

.chip-select.selected {
  background-color: var(--primary-light);
  border-color: rgba(37, 99, 235, 0.25);
  color: var(--primary-hover);
}

/* Tag Chips */
.tag-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: var(--bg-secondary);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  font-size: 0.75rem;
  font-weight: 500;
  padding: 4px 6px 4px 10px;
  border-radius: var(--radius-sm);
}

.tag-chip button {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: all var(--transition);
}

.tag-chip button:hover {
  color: var(--danger);
  background-color: var(--danger-muted);
}

.tag-add-row {
  display: flex;
  gap: 8px;
}

/* Image Upload Grid */
.image-upload-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 12px;
}

.image-upload-tile, .image-preview-tile {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background-color: var(--bg-secondary);
}

.image-upload-tile.add-tile {
  border: 1px dashed var(--border-strong);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.75rem;
  cursor: pointer;
  transition: all var(--transition);
}

.image-upload-tile.add-tile:hover {
  border-color: var(--primary);
  color: var(--primary);
  background-color: var(--primary-light);
}

.image-upload-tile .icon {
  width: 20px;
  height: 20px;
}

.image-preview-tile {
  border: 1px solid var(--border);
}

.image-preview-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.remove-image-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 22px;
  height: 22px;
  border-radius: 4px;
  background-color: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(2px);
  color: #FFFFFF;
  font-size: 1rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color var(--transition);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.remove-image-btn:hover {
  background-color: var(--danger);
}

.color-image-block {
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.color-image-block:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.color-image-block-title {
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 12px;
  color: var(--text-primary);
}

/* Checkboxes */
.checkbox-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  font-size: 0.875rem;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: background-color var(--transition);
}

.checkbox-item:hover {
  background-color: var(--surface-hover);
}

.checkbox-item input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
  cursor: pointer;
}

.form-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding-top: 16px;
  padding-bottom: 32px;
}

/* ==========================================================================
   VIDEO QO'LLANMA
   ========================================================================== */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.video-card {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: block;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.video-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}

.video-thumb-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
}

.video-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.9;
  transition: opacity var(--transition);
}

.video-card:hover .video-thumb-wrap img {
  opacity: 1;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(15, 23, 42, 0.3);
}

.play-overlay svg {
  width: 40px;
  height: 40px;
  color: #FFFFFF;
}

.video-card-info {
  padding: 16px;
}

.video-card-info h3 {
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--text-primary);
}

.video-card-info p {
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

/* ==========================================================================
   SUPPORT
   ========================================================================== */
.support-card {
  max-width: 480px;
  margin: 40px auto 0;
  text-align: center;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 48px 32px;
  box-shadow: var(--shadow-sm);
}

.support-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background-color: var(--primary-light);
  border: 1px solid var(--emerald-muted-border);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
}

.support-card h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.support-card p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
  line-height: 1.6;
}

/* ==========================================================================
   ANALYTICS
   ========================================================================== */
.analytics-top {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.metric-card {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  min-width: 0;
  border-top: 3px solid var(--primary-border);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.metric-card:hover {
  border-top-color: var(--primary);
  box-shadow: var(--shadow-md);
}

.metric-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  font-weight: 500;
  margin-bottom: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.metric-label .icon {
  width: 16px;
  height: 16px;
  color: var(--primary);
  flex-shrink: 0;
}

.metric-value {
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.metric-trend {
  font-size: 0.75rem;
  margin-top: 8px;
  font-weight: 500;
  color: var(--text-muted);
}

.metric-trend.up {
  color: var(--primary);
}

.chart-card {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.chart-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

.chart-card-header h3 {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
}

.chart-legend {
  display: flex;
  gap: 16px;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.dot-legend {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.dot-legend.views { background-color: var(--primary); }
.dot-legend.leads { background-color: var(--text-muted); }

/* Chart controls: metric + date-range selects, top-left of the chart card */
.chart-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.chart-select {
  appearance: none;
  -webkit-appearance: none;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 6px 28px 6px 12px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6' fill='none'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%2364748B' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  transition: border-color var(--transition);
}

.chart-select:hover {
  border-color: var(--border-strong);
}

.chart-select:focus-visible {
  border-color: var(--primary);
}

.analytics-chart {
  width: 100%;
  height: auto;
  min-height: 280px;
  display: block;
  overflow: visible;
}

.chart-point {
  fill: var(--primary);
  stroke: var(--surface);
  stroke-width: 2;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.analytics-chart:hover .chart-point {
  opacity: 1;
}

.chart-gridline {
  stroke: var(--border);
  stroke-width: 1;
  stroke-dasharray: 4 4;
}

.chart-line {
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chart-line-views { stroke: var(--primary); }
.chart-line-leads { stroke: var(--text-muted); }
.chart-line-primary { stroke: var(--primary); }

.chart-axis-label {
  font-size: 10px;
  fill: var(--text-muted);
  font-family: var(--font-family);
}

.analytics-list-card {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.analytics-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.analytics-list-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
}

.analytics-search-bar {
  flex: 0 1 260px;
  min-width: 200px;
}

.analytics-table-scroll {
  overflow-x: auto;
}

.analytics-row {
  display: grid;
  grid-template-columns: 2fr repeat(4, 1fr);
  gap: 8px;
  padding: 12px;
  border-bottom: 1px solid var(--border);
  font-size: 0.8125rem;
  min-width: 640px;
}

.analytics-row:last-child {
  border-bottom: none;
}

.analytics-row-head {
  color: var(--text-secondary);
  font-weight: 500;
  padding-top: 0;
}

.analytics-sort-head {
  cursor: pointer;
  user-select: none;
  display: inline-flex;
  align-items: center;
  transition: color var(--transition);
}

.analytics-sort-head:hover {
  color: var(--text-primary);
}

.analytics-sort-head.active {
  color: var(--primary-hover);
  font-weight: 600;
}

.analytics-product-cell {
  color: var(--text-primary);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: 16px;
}

.analytics-empty {
  padding: 32px 12px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8125rem;
}

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

.page-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  color: var(--text-secondary);
  border: 1px solid transparent;
  transition: all var(--transition);
}

.page-btn:hover:not(:disabled) {
  background-color: var(--surface-hover);
  color: var(--text-primary);
  border-color: var(--border);
}

.page-btn.active {
  background-color: var(--primary-light);
  color: var(--primary-hover);
  border-color: rgba(37, 99, 235, 0.25);
  font-weight: 600;
}

.page-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

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

/* ==========================================================================
   PROFILE
   ========================================================================== */
.profile-card {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.profile-card .form-section {
  background: transparent;
  border: none;
  padding: 0;
  box-shadow: none;
  margin-bottom: 20px;
}

.profile-card .form-section:last-child {
  margin-bottom: 0;
}

.banner-preview {
  width: 100%;
  height: 140px;
  border-radius: var(--radius-sm);
  background-color: var(--bg-secondary);
  background-size: cover;
  background-position: center;
  border: 1px solid var(--border);
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 12px;
}

.banner-change-btn {
  background-color: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(4px);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.profile-photo-row {
  display: flex;
  align-items: center;
  gap: 20px;
}

.profile-photo-preview {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-sm);
  background-color: var(--bg-secondary);
  background-size: cover;
  background-position: center;
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.contact-group {
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.contact-group:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.contact-group-title {
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.contact-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.remove-contact-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background-color: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  transition: all var(--transition);
}

.remove-contact-btn:hover {
  background-color: var(--danger-muted);
  color: var(--danger);
  border-color: var(--danger-border);
}

.location-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
  padding: 12px;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.location-row-fields {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.remove-location-btn {
  color: var(--danger);
  border-color: var(--danger-border);
}

.profile-save-row {
  display: flex;
  justify-content: flex-end;
}

.danger-zone {
  margin-top: 40px;
  border: 1px solid var(--danger-border);
  border-radius: var(--radius-md);
  padding: 24px;
  background-color: var(--danger-base);
}

.danger-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 20px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--danger-border);
}

.danger-row:last-child {
  padding-bottom: 0;
  margin-bottom: 0;
  border-bottom: none;
}

.danger-row-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.danger-row-sub {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* ==========================================================================
   AKSIYA (PROMOTIONS)
   ========================================================================== */
.promo-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 840px;
}

.promo-row {
  display: flex;
  align-items: center;
  gap: 16px;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-sm);
}

.promo-row-discounted {
  border-color: rgba(37, 99, 235, 0.25);
  background-color: var(--primary-light);
}

.promo-thumb {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border);
}

.promo-info {
  flex: 1;
}

.promo-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.discount-tag-badge {
  font-size: 0.6875rem;
  background-color: var(--danger-base);
  color: var(--danger);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--danger-border);
  font-weight: 700;
}

.promo-price {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.promo-price-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 16px;
  margin-top: 12px;
  font-size: 0.8125rem;
}

.promo-label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.promo-old-price {
  text-decoration: line-through;
  color: var(--text-muted);
}

.promo-discount-price {
  font-weight: 600;
  color: var(--primary-hover);
}

.promo-row-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ==========================================================================
   MODALS & OVERLAYS
   ========================================================================== */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(2px);
  z-index: 100;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity var(--transition);
}

.modal-overlay.show {
  display: flex;
  opacity: 1;
}

.modal-card {
  width: 100%;
  max-width: 420px;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
  box-shadow: var(--shadow-modal);
  transform: translateY(10px);
  animation: modalEntrance 200ms ease-out forwards;
}

@keyframes modalEntrance {
  to {
    transform: translateY(0);
  }
}

.modal-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.modal-text {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
  line-height: 1.5;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
}

#authOverlay > div {
  border: 1px solid var(--border) !important;
  box-shadow: var(--shadow-modal) !important;
  border-radius: 14px !important;
  background-color: var(--surface) !important;
  color: var(--text-primary) !important;
}

/* ==========================================================================
   TOAST
   ========================================================================== */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background-color: var(--surface);
  color: var(--text-primary);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition), transform var(--transition);
  z-index: 9999;
  text-align: center;
}

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

/* ==========================================================================
   MOBILE BOTTOM NAVIGATION
   ========================================================================== */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--bottom-nav-height);
  background-color: var(--surface);
  border-top: 1px solid var(--border);
  box-shadow: 0 -2px 12px rgba(15, 23, 42, 0.05);
  z-index: 60;
  padding-bottom: env(safe-area-inset-bottom);
}

.bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--text-muted);
  font-size: 0.6875rem;
  font-weight: 500;
  transition: color var(--transition);
}

.bottom-nav-item .icon {
  width: 20px;
  height: 20px;
}

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

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 992px) {
  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
}

@media (max-width: 768px) {
  .sidebar {
    display: none;
    position: fixed;
    z-index: 80;
    transform: translateX(-100%);
    transition: transform 200ms ease-out;
  }
  
  .sidebar.open {
    display: flex;
    transform: translateX(0);
  }

  .mobile-topbar {
    display: flex;
  }

  .bottom-nav {
    display: flex;
  }

  .main-content {
    padding: 20px 16px 80px;
  }

  .content-header {
    flex-direction: column;
    gap: 16px;
  }

  .header-actions-right {
    display: none;
  }

  .page-title {
    font-size: 1.375rem;
  }

  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  
  .toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  
  .search-bar {
    width: 100%;
  }
  
  .analytics-top {
    grid-template-columns: repeat(2, 1fr);
  }

  .analytics-search-bar {
    flex: 1 1 100%;
    width: 100%;
  }

  .chart-controls {
    width: 100%;
  }

  .chart-select {
    flex: 1;
  }

  .promo-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .promo-row-actions {
    width: 100%;
    flex-direction: row;
  }
  
  .promo-row-actions .btn {
    flex: 1;
  }

  .profile-photo-row {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .location-row {
    flex-direction: column;
  }
  
  .location-row-fields {
    width: 100%;
  }
  
  .danger-row {
    flex-direction: column;
    align-items: flex-start;
  }
}


/* Delete product button */
.card-seller-actions .btn-danger {
  width: 100%;
  flex: 1;
  background: var(--danger);
  color: #fff;
  border: 1px solid var(--danger);
  box-shadow: 0 2px 4px rgba(220, 38, 38, 0.15);
}

.card-seller-actions .btn-danger:hover {
  background: #B91C1C;
  border-color: #B91C1C;
  color: #fff;
}

.card-seller-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.card-seller-actions-row {
  display: flex;
  gap: 8px;
  width: 100%;
}

.card-seller-actions-row .btn {
  flex: 1;
}

.card-seller-actions .btn-danger {
  width: 100%;
}