/* ============================================================
   SPEEDCOURRIER MARKETPLACE — Admin & Dashboard Styles
   ============================================================ */

/* ── TOPBAR (Dashboard) ────────────────────────────────────── */
.topbar {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  padding: 0 32px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.topbar__left { display: flex; align-items: center; gap: 16px; }
.topbar__title { font-family: var(--font-display); font-size: 1.1rem; font-weight: 700; color: var(--gray-900); }
.topbar__right { display: flex; align-items: center; gap: 12px; }

.topbar__notif {
  position: relative;
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius);
  color: var(--gray-600);
  font-size: 1rem;
  transition: background var(--transition);
}
.topbar__notif:hover { background: var(--gray-100); }
.notif-dot {
  position: absolute;
  top: 7px; right: 7px;
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 50%;
  border: 2px solid white;
}

.topbar__user {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: var(--radius);
  transition: background var(--transition);
}
.topbar__user:hover { background: var(--gray-100); }
.topbar__user-info { line-height: 1.2; }
.topbar__user-name { font-size: .85rem; font-weight: 600; color: var(--gray-800); }
.topbar__user-role { font-size: .72rem; color: var(--gray-500); }

/* ── OVERVIEW CHARTS ───────────────────────────────────────── */
.chart-card {
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}
.chart-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.chart-card__title { font-size: 1rem; font-weight: 700; color: var(--gray-900); }
.chart-card__subtitle { font-size: .78rem; color: var(--gray-500); margin-top: 2px; }

/* ── STATUS PILLS ──────────────────────────────────────────── */
.status { display: inline-flex; align-items: center; gap: 5px; font-size: .78rem; font-weight: 600; padding: 4px 10px; border-radius: var(--radius-full); }
.status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; }
.status-pending  { background: #fef3c7; color: #92400e; }
.status-pending::before  { background: #f59e0b; }
.status-active   { background: #d1fae5; color: #065f46; }
.status-active::before   { background: #10b981; }
.status-shipped  { background: var(--blue-100); color: var(--blue-700); }
.status-shipped::before  { background: var(--primary); }
.status-delivered{ background: #d1fae5; color: #065f46; }
.status-delivered::before{ background: #059669; }
.status-cancelled{ background: #fee2e2; color: #991b1b; }
.status-cancelled::before{ background: #ef4444; }
.status-approved { background: #d1fae5; color: #065f46; }
.status-approved::before { background: #10b981; }
.status-review   { background: #ede9fe; color: #5b21b6; }
.status-review::before   { background: #8b5cf6; }
.status-suspended{ background: #fee2e2; color: #991b1b; }
.status-suspended::before{ background: #ef4444; }

/* ── MODALS ────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fadeIn .2s ease;
}
.modal {
  background: white;
  border-radius: var(--radius-xl);
  padding: 32px;
  max-width: 520px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  animation: fadeUp .3s ease;
}
.modal-lg { max-width: 720px; }
.modal__header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.modal__title { font-size: 1.2rem; font-weight: 700; color: var(--gray-900); }
.modal__close { color: var(--gray-400); font-size: 1.2rem; transition: color var(--transition); }
.modal__close:hover { color: var(--gray-700); }
.modal__footer { display: flex; gap: 10px; justify-content: flex-end; margin-top: 28px; }

/* ── PAGINATION ────────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 24px;
}
.page-btn {
  min-width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius);
  font-size: .85rem;
  font-weight: 600;
  color: var(--gray-600);
  background: white;
  border: 1px solid var(--gray-200);
  transition: all var(--transition);
}
.page-btn:hover { border-color: var(--primary); color: var(--primary); }
.page-btn.active { background: var(--primary); color: white; border-color: var(--primary); }
.page-btn:disabled { opacity: .4; cursor: not-allowed; }

/* ── PRODUCT IMAGE GRID ────────────────────────────────────── */
.img-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.img-grid-main {
  grid-column: 1 / -1;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.img-grid-thumb {
  aspect-ratio: 1;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color var(--transition);
}
.img-grid-thumb.active { border-color: var(--primary); }
.img-grid-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--transition-slow); }
.img-grid-thumb:hover img { transform: scale(1.05); }

/* ── REVIEW STARS ──────────────────────────────────────────── */
.review-stars { display: flex; align-items: center; gap: 2px; }
.review-stars i { font-size: 1rem; color: var(--gray-300); }
.review-stars i.filled { color: var(--accent); }

.review-card {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 16px;
}
.review-card__header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.review-card__user { display: flex; align-items: center; gap: 10px; }
.review-card__name { font-weight: 600; font-size: .9rem; color: var(--gray-900); }
.review-card__date { font-size: .75rem; color: var(--gray-400); }
.review-card__text { font-size: .875rem; color: var(--gray-600); line-height: 1.6; }

/* ── CHAT / MESSAGE ────────────────────────────────────────── */
.msg-bubble {
  max-width: 75%;
  padding: 12px 16px;
  border-radius: var(--radius-lg);
  font-size: .875rem;
  line-height: 1.5;
  margin-bottom: 8px;
}
.msg-bubble.sent {
  background: var(--primary);
  color: white;
  margin-left: auto;
  border-bottom-right-radius: 4px;
}
.msg-bubble.received {
  background: var(--gray-100);
  color: var(--gray-800);
  border-bottom-left-radius: 4px;
}

/* ── PROGRESS BAR ──────────────────────────────────────────── */
.progress { background: var(--gray-100); border-radius: var(--radius-full); height: 8px; overflow: hidden; }
.progress-bar { height: 100%; border-radius: var(--radius-full); transition: width .8s ease; }
.progress-bar.primary { background: linear-gradient(90deg, var(--primary) 0%, var(--blue-400) 100%); }
.progress-bar.accent  { background: linear-gradient(90deg, var(--accent) 0%, var(--orange-400) 100%); }
.progress-bar.success { background: linear-gradient(90deg, #10b981 0%, #34d399 100%); }

/* ── TRACKING TIMELINE ─────────────────────────────────────── */
.tracking-timeline { position: relative; }
.tracking-step {
  display: flex;
  gap: 16px;
  padding-bottom: 28px;
  position: relative;
}
.tracking-step::before {
  content: '';
  position: absolute;
  left: 19px;
  top: 40px;
  bottom: 0;
  width: 2px;
  background: var(--gray-200);
}
.tracking-step:last-child::before { display: none; }

.tracking-step__dot {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .85rem;
  font-weight: 700;
  position: relative;
  z-index: 1;
}
.tracking-step__dot.done { background: linear-gradient(135deg, var(--success) 0%, #34d399 100%); color: white; }
.tracking-step__dot.current { background: linear-gradient(135deg, var(--primary) 0%, var(--blue-400) 100%); color: white; box-shadow: 0 0 0 4px var(--blue-100); }
.tracking-step__dot.pending { background: var(--gray-100); color: var(--gray-400); border: 2px solid var(--gray-200); }

.tracking-step__content { flex: 1; padding-top: 8px; }
.tracking-step__title { font-weight: 700; font-size: .95rem; color: var(--gray-900); }
.tracking-step__meta { font-size: .78rem; color: var(--gray-500); margin-top: 3px; }
.tracking-step__location { font-size: .8rem; color: var(--primary); font-weight: 600; margin-top: 4px; }

/* ── SELLER PROFILE HEADER ─────────────────────────────────── */
.seller-hero {
  background: linear-gradient(135deg, var(--blue-900) 0%, var(--blue-700) 100%);
  padding: 48px 0;
  position: relative;
}
.seller-hero__inner { display: flex; align-items: center; gap: 28px; }
.seller-hero__avatar {
  width: 100px; height: 100px;
  border-radius: var(--radius-lg);
  border: 3px solid rgba(255,255,255,.2);
  background: white;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 2rem;
  color: var(--primary);
  flex-shrink: 0;
}
.seller-hero__name { font-family: var(--font-display); font-size: 1.6rem; font-weight: 800; color: white; }
.seller-hero__meta { display: flex; align-items: center; gap: 16px; margin-top: 8px; }
.seller-hero__tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.seller-hero__tag {
  background: rgba(255,255,255,.12);
  color: rgba(255,255,255,.8);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: .78rem;
  font-weight: 600;
}

/* ── SEARCH FILTERS ────────────────────────────────────────── */
.filter-panel {
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  padding: 24px;
}
.filter-section { margin-bottom: 24px; }
.filter-section:last-child { margin-bottom: 0; }
.filter-title { font-size: .85rem; font-weight: 700; color: var(--gray-800); margin-bottom: 14px; text-transform: uppercase; letter-spacing: .05em; }

.price-range { display: flex; align-items: center; gap: 8px; }
.price-range input { flex: 1; }

.filter-checkbox { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; cursor: pointer; }
.filter-checkbox input[type="checkbox"] { accent-color: var(--primary); width: 15px; height: 15px; cursor: pointer; }
.filter-checkbox span { font-size: .875rem; color: var(--gray-700); }

/* ── EMPTY STATE ───────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 60px 24px;
}
.empty-state__icon {
  font-size: 3.5rem;
  margin-bottom: 20px;
  opacity: .4;
}
.empty-state h3 { font-size: 1.2rem; color: var(--gray-800); margin-bottom: 8px; }
.empty-state p { color: var(--gray-500); font-size: .9rem; max-width: 320px; margin-inline: auto; margin-bottom: 24px; }

/* ── STEP INDICATOR ────────────────────────────────────────── */
.steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 40px;
}
.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex: 1;
  position: relative;
}
.step::before {
  content: '';
  position: absolute;
  top: 17px;
  left: 50%;
  right: -50%;
  height: 2px;
  background: var(--gray-200);
  z-index: 0;
}
.step:last-child::before { display: none; }
.step.done::before { background: var(--primary); }

.step__num {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .85rem;
  font-weight: 700;
  position: relative;
  z-index: 1;
  border: 2px solid var(--gray-200);
  background: white;
  color: var(--gray-400);
}
.step.done .step__num { border-color: var(--primary); background: var(--primary); color: white; }
.step.active .step__num { border-color: var(--primary); color: var(--primary); box-shadow: 0 0 0 3px var(--blue-100); }

.step__label { font-size: .72rem; font-weight: 600; color: var(--gray-500); text-align: center; text-transform: uppercase; letter-spacing: .04em; }
.step.active .step__label { color: var(--primary); }
.step.done .step__label { color: var(--gray-700); }

/* ── HOW IT WORKS CARD ─────────────────────────────────────── */
.how-card {
  text-align: center;
  padding: 40px 24px;
  border-radius: var(--radius-xl);
  background: white;
  border: 1px solid var(--gray-200);
  position: relative;
  transition: transform var(--transition), box-shadow var(--transition);
}
.how-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.how-card__num {
  position: absolute;
  top: -16px;
  left: 50%;
  transform: translateX(-50%);
  width: 32px; height: 32px;
  background: var(--accent);
  color: white;
  font-weight: 800;
  font-size: .85rem;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
}
.how-card__icon {
  width: 72px; height: 72px;
  border-radius: var(--radius-xl);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem;
  margin-inline: auto;
  margin-bottom: 20px;
}
.how-card h4 { font-size: 1.05rem; margin-bottom: 10px; }
.how-card p { font-size: .875rem; color: var(--gray-500); line-height: 1.6; }

/* ── UPLOAD ZONE ───────────────────────────────────────────── */
.upload-zone {
  border: 2px dashed var(--gray-300);
  border-radius: var(--radius-lg);
  padding: 40px 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
}
.upload-zone:hover { border-color: var(--primary); background: var(--blue-50); }
.upload-zone__icon { font-size: 2.5rem; color: var(--gray-400); margin-bottom: 12px; }
.upload-zone h4 { font-size: .95rem; color: var(--gray-700); margin-bottom: 6px; }
.upload-zone p { font-size: .8rem; color: var(--gray-500); }

/* ── RESPONSIVE DASHBOARD ──────────────────────────────────── */
@media (max-width: 1024px) {
  .chart-card { margin-bottom: 24px; }
}
@media (max-width: 768px) {
  .topbar { padding: 0 16px; }
  .dashboard-content { padding: 16px; }
  .stat-card__value { font-size: 1.4rem; }
}
