/* Vendor dashboard — extends clothes-theme.css */

body.vendor-page {
  padding: 24px 16px calc(var(--nav-height) + 32px);
  display: block;
  min-height: 100vh;
}

.vendor-shell {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
}

.vendor-splash {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--surface-2);
  color: var(--text);
  animation: fadeOutSplash 1.2s forwards;
  animation-delay: 0.9s;
}
@keyframes fadeOutSplash {
  to { opacity: 0; visibility: hidden; pointer-events: none; }
}

.vendor-card {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  padding: clamp(18px, 3vw, 28px);
  margin: 14px 0;
  animation: fadeInUp 0.55s var(--ease-out) both;
}

.vendor-card h2 {
  margin: 0 0 6px;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.vendor-card .sub {
  margin: 0 0 16px;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.vendor-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.vendor-tab {
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s var(--ease-out);
}
.vendor-tab.active,
.vendor-tab:hover {
  color: var(--accent);
  border-color: rgba(37, 99, 235, 0.35);
  background: var(--accent-soft);
}

.vendor-panel { display: none; }
.vendor-panel.active { display: block; }

.vendor-grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 12px;
}

.product-block {
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 16px;
  border-radius: 14px;
  margin: 12px 0;
  box-shadow: var(--card-shadow);
  animation: fadeInUp 0.45s var(--ease-out) both;
}
.product-block label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 6px;
}
.product-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
  gap: 10px;
  margin-bottom: 10px;
}

.vendor-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.media-preview {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.media-preview-item {
  width: 72px;
  height: 72px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface-2);
  position: relative;
}
.media-preview-item img,
.media-preview-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.media-preview-item .tag {
  position: absolute;
  left: 4px;
  bottom: 4px;
  font-size: 0.62rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  color: #fff;
}

.list-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  background: var(--surface-2);
  margin-bottom: 10px;
}
.list-card-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}
.list-card-head h4 {
  margin: 0;
  font-size: 0.95rem;
}
.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}
.status-pill.in { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.status-pill.out { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.status-pill.pending { background: #fff7ed; color: #9a3412; border: 1px solid #fed7aa; }

.empty-state {
  text-align: center;
  padding: 28px 16px;
  color: var(--text-muted);
  border: 1px dashed var(--border);
  border-radius: 12px;
  background: var(--surface-2);
}

#overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(3px);
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.25s, visibility 0.25s;
  z-index: 1200;
}
#overlay.show {
  visibility: visible;
  opacity: 1;
}

#toast {
  visibility: hidden;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 16px 18px;
  border-radius: 14px;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.92);
  opacity: 0;
  transition: 0.25s var(--ease-out);
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 1300;
  box-shadow: 0 20px 48px rgba(15, 23, 42, 0.18);
}
#toast.show {
  visibility: visible;
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.spinner {
  border: 3px solid rgba(37, 99, 235, 0.15);
  border-top: 3px solid var(--accent);
  border-radius: 50%;
  width: 20px;
  height: 20px;
  animation: spin 1s linear infinite;
}
@keyframes spin { 100% { transform: rotate(360deg); } }

#loginMsg, #successMsg { font-size: 0.9rem; font-weight: 600; }

.variant-section {
  margin-top: 12px;
  padding: 12px;
  border: 1px dashed var(--border);
  border-radius: 12px;
  background: var(--surface-2);
}
.variant-section > label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.variant-rows { display: flex; flex-direction: column; gap: 8px; }
.variant-row {
  display: grid;
  grid-template-columns: 1fr 90px auto;
  gap: 8px;
  align-items: center;
}
.variant-row input { margin: 0; }
.variant-matrix-head,
.variant-row.matrix-row {
  display: grid;
  grid-template-columns: 1fr 1fr 90px auto;
  gap: 8px;
  align-items: center;
}
.variant-matrix-head {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.variant-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 0 0 8px;
  line-height: 1.4;
}
.btn-sm {
  padding: 6px 10px;
  font-size: 0.78rem;
}

@media (max-width: 639px) {
  body.vendor-page { padding-inline: 12px; }
  .vendor-actions .btn { flex: 1 1 100%; }
}
