/* ============================================
   NEXA SELLER PORTAL — STYLES
   ============================================ */
:root {
  --primary: #FF6B00;
  --primary-dark: #e05a00;
  --secondary: #0F0F1A;
  --sidebar-bg: #0F0F1A;
  --sidebar-width: 260px;
  --bg: #F4F6FA;
  --surface: #FFFFFF;
  --surface-2: #F0F2F5;
  --border: #E5E7EB;
  --text: #111827;
  --text-2: #4B5563;
  --text-3: #9CA3AF;
  --success: #10B981;
  --danger: #EF4444;
  --warning: #F59E0B;
  --info: #3B82F6;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 2px 12px rgba(0,0,0,0.07);
  --shadow-md: 0 8px 30px rgba(0,0,0,0.1);
  --font-display: 'Clash Display', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
  --transition: all 0.25s cubic-bezier(0.4,0,0.2,1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-body); background: var(--bg); color: var(--text); display: flex; min-height: 100vh; overflow-x: hidden; }
a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
img { max-width: 100%; display: block; }

/* ============================================
   SIDEBAR
   ============================================ */
.sidebar {
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  height: 100vh;
  position: fixed;
  left: 0; top: 0;
  display: flex;
  flex-direction: column;
  z-index: 100;
  overflow-y: auto;
  scrollbar-width: none;
  transition: var(--transition);
}
.sidebar::-webkit-scrollbar { display: none; }

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 24px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.logo-icon {
  width: 40px; height: 40px;
  background: var(--primary);
  color: #fff;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-weight: 700; font-size: 22px;
  flex-shrink: 0;
}
.logo-text { font-family: var(--font-display); font-size: 22px; font-weight: 700; color: #fff; display: block; line-height: 1.1; }
.logo-sub { font-size: 11px; color: rgba(255,255,255,0.4); font-weight: 500; letter-spacing: 0.5px; display: block; }

.seller-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.seller-avatar-lg {
  width: 44px; height: 44px;
  background: var(--primary);
  color: #fff;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 18px;
  flex-shrink: 0;
}
.seller-name-side { font-size: 14px; font-weight: 700; color: #fff; }
.seller-status { display: flex; align-items: center; gap: 6px; font-size: 12px; color: rgba(255,255,255,0.5); margin-top: 2px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); }

.sidebar-nav { padding: 16px 12px; flex: 1; }
.nav-section-label { font-size: 10px; font-weight: 700; color: rgba(255,255,255,0.3); text-transform: uppercase; letter-spacing: 1px; padding: 12px 8px 6px; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 10px;
  color: rgba(255,255,255,0.65);
  font-size: 14px;
  font-weight: 500;
  transition: var(--transition);
  margin-bottom: 2px;
  position: relative;
}
.nav-item:hover { background: rgba(255,255,255,0.08); color: #fff; }
.nav-item.active { background: var(--primary); color: #fff; font-weight: 600; }
.nav-icon { font-size: 17px; flex-shrink: 0; }
.nav-badge {
  margin-left: auto;
  background: rgba(255,255,255,0.15);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 100px;
}
.nav-badge.new { background: var(--danger); }

/* ============================================
   MAIN WRAP
   ============================================ */
.main-wrap {
  margin-left: var(--sidebar-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ============================================
   TOPBAR
   ============================================ */
.topbar-dash {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 28px;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow);
}
.menu-toggle { font-size: 22px; color: var(--text-2); display: none; }
.topbar-search {
  flex: 1;
  max-width: 400px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface-2);
  border-radius: 10px;
  padding: 0 14px;
  height: 40px;
}
.topbar-search input { flex: 1; border: none; background: none; outline: none; font-family: var(--font-body); font-size: 13.5px; color: var(--text); }
.topbar-actions { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.topbar-btn { position: relative; font-size: 20px; padding: 8px; border-radius: 8px; transition: var(--transition); }
.topbar-btn:hover { background: var(--surface-2); }
.notif-dot { position: absolute; top: 6px; right: 6px; width: 8px; height: 8px; background: var(--danger); border-radius: 50%; border: 2px solid #fff; }
.topbar-user { display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 6px 12px; border-radius: 10px; transition: var(--transition); }
.topbar-user:hover { background: var(--surface-2); }
.user-avatar { width: 34px; height: 34px; background: var(--primary); color: #fff; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; }
.topbar-user span { font-size: 14px; font-weight: 600; }

/* ============================================
   CONTENT
   ============================================ */
.dash-content { padding: 28px; flex: 1; }

.page-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 24px; flex-wrap: wrap; gap: 16px; }
.page-title { font-family: var(--font-display); font-size: 28px; font-weight: 700; margin-bottom: 4px; }
.page-sub { font-size: 14px; color: var(--text-3); }
.page-actions { display: flex; gap: 10px; }

.alert-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, #fff3e0, #ffe0b2);
  border: 1.5px solid #ffcc80;
  border-radius: var(--radius);
  padding: 14px 20px;
  margin-bottom: 24px;
  font-size: 14px;
  font-weight: 500;
}
.alert-banner button { margin-left: auto; color: var(--text-3); font-size: 16px; }

/* ============================================
   STATS GRID
   ============================================ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow);
  transition: var(--transition);
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.stat-icon { width: 52px; height: 52px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 24px; flex-shrink: 0; }
.stat-value { font-family: var(--font-display); font-size: 26px; font-weight: 700; line-height: 1; margin-bottom: 4px; }
.stat-label { font-size: 13px; color: var(--text-3); margin-bottom: 6px; }
.stat-change { font-size: 12px; font-weight: 600; }
.stat-change.positive { color: var(--success); }
.stat-change.negative { color: var(--danger); }
.stat-change.neutral { color: var(--text-3); }

/* ============================================
   CHARTS
   ============================================ */
.charts-row { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; margin-bottom: 24px; }
.chart-card { background: var(--surface); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.chart-card.wide { }
.chart-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.chart-header h3 { font-family: var(--font-display); font-size: 17px; font-weight: 700; }
.chart-tabs { display: flex; gap: 4px; background: var(--surface-2); border-radius: 8px; padding: 3px; }
.chart-tab { padding: 6px 14px; border-radius: 6px; font-size: 12.5px; font-weight: 600; font-family: var(--font-body); color: var(--text-3); transition: var(--transition); }
.chart-tab.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }

/* ============================================
   BOTTOM ROW
   ============================================ */
.bottom-row { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; margin-bottom: 24px; }
.table-card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.card-header { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid var(--border); }
.card-header h3 { font-family: var(--font-display); font-size: 17px; font-weight: 700; }
.see-all-link { font-size: 13.5px; color: var(--primary); font-weight: 600; }
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { padding: 12px 16px; text-align: left; font-size: 12px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.5px; background: var(--surface-2); border-bottom: 1px solid var(--border); white-space: nowrap; }
.data-table td { padding: 14px 16px; font-size: 13.5px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: #fffbf7; }
.order-id { font-weight: 700; color: var(--primary); font-size: 13px; }
.customer-cell { display: flex; align-items: center; gap: 8px; }
.customer-av { width: 30px; height: 30px; border-radius: 8px; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; flex-shrink: 0; }
.status-badge { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 100px; font-size: 11.5px; font-weight: 700; }
.status-badge.pending { background: #fef3c7; color: #d97706; }
.status-badge.processing { background: #dbeafe; color: #2563eb; }
.status-badge.shipped { background: #ede9fe; color: #7c3aed; }
.status-badge.delivered { background: #d1fae5; color: #059669; }
.status-badge.cancelled { background: #fee2e2; color: #dc2626; }

/* TOP PRODUCTS */
.top-products-list { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.top-product-item { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 10px; transition: var(--transition); }
.top-product-item:hover { background: var(--surface-2); }
.top-product-rank { width: 24px; height: 24px; border-radius: 6px; background: var(--surface-2); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: var(--text-3); flex-shrink: 0; }
.top-product-rank.gold { background: #fef3c7; color: #d97706; }
.top-product-rank.silver { background: #f3f4f6; color: #6b7280; }
.top-product-rank.bronze { background: #fff3e0; color: #ea580c; }
.top-product-img { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; background: var(--surface-2); flex-shrink: 0; }
.top-product-info { flex: 1; min-width: 0; }
.top-product-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-product-sales { font-size: 12px; color: var(--text-3); }
.top-product-revenue { font-size: 14px; font-weight: 700; color: var(--primary); flex-shrink: 0; }

/* ============================================
   QUICK ACTIONS
   ============================================ */
.quick-actions-section { margin-bottom: 24px; }
.section-title { font-family: var(--font-display); font-size: 20px; font-weight: 700; margin-bottom: 16px; }
.actions-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.action-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 20px 12px;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  text-align: center;
  transition: var(--transition);
  border: 2px solid transparent;
}
.action-card:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-3px); box-shadow: var(--shadow-md); }
.action-icon { font-size: 28px; }

/* ============================================
   BUTTONS
   ============================================ */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 11px 22px;
  background: var(--primary); color: #fff;
  border-radius: 10px; font-size: 13.5px; font-weight: 700;
  font-family: var(--font-body); transition: var(--transition);
  border: 2px solid var(--primary); cursor: pointer;
}
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); transform: translateY(-1px); }
.btn-outline {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 11px 22px;
  background: transparent; color: var(--primary);
  border-radius: 10px; font-size: 13.5px; font-weight: 700;
  font-family: var(--font-body); transition: var(--transition);
  border: 2px solid var(--primary); cursor: pointer;
}
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-danger {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 8px 16px;
  background: var(--danger); color: #fff;
  border-radius: 8px; font-size: 13px; font-weight: 600;
  font-family: var(--font-body); transition: var(--transition); cursor: pointer;
}
.btn-sm { padding: 7px 14px; font-size: 12.5px; }

/* ============================================
   FORMS
   ============================================ */
.form-section { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px; margin-bottom: 20px; }
.form-section-title { font-family: var(--font-display); font-size: 18px; font-weight: 700; margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group.full { grid-column: 1 / -1; }
.form-label { font-size: 13px; font-weight: 700; color: var(--text-2); }
.form-input, .form-select, .form-textarea {
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 14px;
  outline: none;
  transition: var(--transition);
  background: var(--surface);
  color: var(--text);
}
.form-input:focus, .form-select:focus, .form-textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(255,107,0,0.1); }
.form-textarea { resize: vertical; min-height: 100px; }
.form-hint { font-size: 12px; color: var(--text-3); }

/* ============================================
   PRODUCT UPLOAD
   ============================================ */
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 40px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  background: var(--surface-2);
}
.upload-zone:hover { border-color: var(--primary); background: #fff3e0; }
.upload-icon { font-size: 48px; margin-bottom: 12px; }
.upload-text { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.upload-sub { font-size: 13px; color: var(--text-3); }
.image-previews { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.image-preview { width: 80px; height: 80px; border-radius: 10px; object-fit: cover; border: 2px solid var(--border); }

/* ============================================
   FILTERS BAR
   ============================================ */
.filters-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.filter-select { padding: 9px 14px; border: 1.5px solid var(--border); border-radius: 8px; font-family: var(--font-body); font-size: 13.5px; outline: none; background: var(--surface); cursor: pointer; }
.filter-select:focus { border-color: var(--primary); }
.search-input-bar { flex: 1; max-width: 300px; padding: 9px 14px; border: 1.5px solid var(--border); border-radius: 8px; font-family: var(--font-body); font-size: 13.5px; outline: none; }
.search-input-bar:focus { border-color: var(--primary); }

/* ============================================
   PRODUCT TABLE
   ============================================ */
.product-img-cell { width: 52px; height: 52px; border-radius: 8px; object-fit: cover; background: var(--surface-2); }
.product-name-cell { font-weight: 600; font-size: 13.5px; }
.product-cat-cell { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.stock-badge { display: inline-block; padding: 3px 8px; border-radius: 6px; font-size: 11.5px; font-weight: 700; }
.stock-badge.in { background: #d1fae5; color: #059669; }
.stock-badge.low { background: #fef3c7; color: #d97706; }
.stock-badge.out { background: #fee2e2; color: #dc2626; }
.action-btns { display: flex; gap: 6px; }
.icon-btn { width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 15px; transition: var(--transition); }
.icon-btn:hover { background: var(--surface-2); }
.icon-btn.edit:hover { background: #dbeafe; }
.icon-btn.delete:hover { background: #fee2e2; }

/* ============================================
   ANALYTICS
   ============================================ */
.analytics-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-bottom: 24px; }
.analytics-card { background: var(--surface); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.analytics-card.full { grid-column: 1 / -1; }
.analytics-card h3 { font-family: var(--font-display); font-size: 17px; font-weight: 700; margin-bottom: 20px; }

/* ============================================
   TOAST
   ============================================ */
.toast {
  position: fixed; bottom: 24px; right: 24px;
  background: var(--secondary); color: #fff;
  padding: 14px 22px; border-radius: 12px;
  font-size: 14px; font-weight: 500;
  z-index: 9999;
  transform: translateY(100px); opacity: 0;
  transition: all 0.35s cubic-bezier(0.4,0,0.2,1);
  box-shadow: var(--shadow-md);
  border-left: 4px solid var(--primary);
  max-width: 320px;
}
.toast.show { transform: translateY(0); opacity: 1; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1200px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .charts-row { grid-template-columns: 1fr; }
  .bottom-row { grid-template-columns: 1fr; }
  .actions-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-wrap { margin-left: 0; }
  .menu-toggle { display: block; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .form-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .stats-grid { grid-template-columns: 1fr; }
  .actions-grid { grid-template-columns: repeat(2, 1fr); }
  .dash-content { padding: 16px; }
}