/* ============================================================
   Panel CSS — Seller & Admin shared layout + cosmetics
   NO !important — works alongside Bootstrap, not against it
   ============================================================ */

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
  background: #f1f3f8;
  color: #2c3345;
  margin: 0;
}

/* ── Topbar ─────────────────────────────── */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; height: 56px;
  background: #fff;
  border-bottom: 1px solid #e4e8f0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 22px;
  z-index: 400;
  box-shadow: 0 1px 4px rgba(0,0,0,.05);
}
.topbar-brand { font-size: 15px; font-weight: 800; color: #1d2b4f; letter-spacing: -.02em; }
.topbar-brand em { font-style: normal; }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.topbar-user-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 10px; border-radius: 8px;
  cursor: pointer; transition: background .15s;
  border: none; background: none;
}
.topbar-user-btn:hover { background: #f4f6fc; }
.t-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 13px; font-weight: 700; flex-shrink: 0;
}
.t-name { font-size: 13px; font-weight: 600; color: #2c3345; line-height: 1.2; }
.t-role { font-size: 10px; font-weight: 700; letter-spacing: .06em; padding: 1px 7px; border-radius: 20px; display: inline-block; }
.t-role.seller { background: #fef3cd; color: #92650a; }
.t-role.admin  { background: #dce9ff; color: #1a4da0; }

/* ── Sidebar ────────────────────────────── */
#sidebar {
  position: fixed; top: 0; left: 0; bottom: 0;
  width: 220px; padding-top: 56px;
  overflow-y: auto; z-index: 300;
}
#sidebar::-webkit-scrollbar { width: 4px; }
#sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.15); border-radius: 4px; }
.sidebar-section {
  padding: 16px 18px 4px;
  font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: rgba(255,255,255,.32);
}
.nav-link-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 18px; font-size: 13px; font-weight: 500;
  color: rgba(255,255,255,.6); text-decoration: none;
  border-left: 3px solid transparent; transition: all .14s;
}
.nav-link-item i { width: 17px; text-align: center; font-size: 13px; opacity: .7; }
.nav-link-item:hover { background: rgba(255,255,255,.07); color: rgba(255,255,255,.95); text-decoration: none; }
.nav-link-item.active { color: #fff; background: rgba(255,255,255,.1); border-left-color: #6a9fdb; }
.nav-link-item.active i { opacity: 1; }

/* ── Main content ───────────────────────── */
#main-content { margin-left: 220px; padding-top: 56px; min-height: 100vh; }
.page-inner { padding: 26px 24px; }

/* ── Page titles ────────────────────────── */
.page-title { font-size: 18px; font-weight: 800; color: #1d2b4f; margin: 0 0 3px; }
.page-subtitle { font-size: 12px; color: #9aa3b8; margin: 0 0 20px; }

/* ── Stat cards ─────────────────────────── */
.stat-card {
  background: #fff; border-radius: 12px;
  padding: 18px 18px; display: flex; align-items: center; gap: 14px;
  border: 1px solid #eaecf5; margin-bottom: 20px;
  box-shadow: 0 1px 5px rgba(0,0,0,.05);
}
.stat-icon {
  width: 46px; height: 46px; border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
}
.stat-val { font-size: 26px; font-weight: 800; color: #1d2b4f; line-height: 1; }
.stat-label { font-size: 11px; color: #9aa3b8; margin-top: 3px; }

/* ── Panel cards ────────────────────────── */
.panel-card {
  background: #fff; border-radius: 12px;
  border: 1px solid #eaecf5; margin-bottom: 22px;
  box-shadow: 0 1px 5px rgba(0,0,0,.05); overflow: hidden;
}
.panel-card-header {
  padding: 13px 18px; border-bottom: 1px solid #f0f2f9;
  display: flex; align-items: center; justify-content: space-between;
}
.panel-card-title { font-size: 13px; font-weight: 700; color: #1d2b4f; margin: 0; }
.panel-card-body { padding: 16px 18px; }

/* ── Tables ─────────────────────────────── */
.table thead th {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .07em; color: #9aa3b8;
  background: #f8f9fd; border-top: none;
  border-bottom: 1px solid #eaecf5; padding: 10px 14px;
}
.table tbody td { padding: 11px 14px; border-color: #f0f2f9; vertical-align: middle; }
.table tbody tr:hover td { background: #fafbff; }

/* ── Status badges ──────────────────────── */
.status-badge {
  font-size: 11px; font-weight: 700; padding: 3px 10px;
  border-radius: 20px; display: inline-block; white-space: nowrap;
}
.badge-pending   { background: #fff4dc; color: #b76d00; }
.badge-confirmed { background: #dcf5e7; color: #1a7a35; }
.badge-shipped   { background: #dce9ff; color: #1a4da0; }
.badge-delivered { background: #ece4ff; color: #5a29b0; }
.badge-cancelled { background: #fde8e8; color: #c0392b; }

/* ── Action buttons ─────────────────────── */
.btn-action {
  padding: 5px 11px; font-size: 12px; font-weight: 600;
  border-radius: 7px; border: none; cursor: pointer;
  display: inline-flex; align-items: center; gap: 5px;
  transition: all .13s; line-height: 1.5;
}
.btn-edit   { background: #e8f0fe; color: #1a56c4; }
.btn-delete { background: #feecec; color: #c0392b; }
.btn-view   { background: #e8f0fe; color: #1a56c4; }
.btn-edit:hover   { background: #d0e2fd; }
.btn-delete:hover { background: #fdd8d8; }
.btn-view:hover   { background: #d0e2fd; }
.btn-primary-sm {
  background: #1d2b4f; color: #fff;
  padding: 7px 16px; font-size: 12px; font-weight: 700;
  border-radius: 8px; border: none; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  transition: background .15s;
}
.btn-primary-sm:hover { background: #2a3f74; }

/* ── Forms (cosmetic only, no Bootstrap override) ── */
.form-label-custom {
  font-size: 11px; font-weight: 700; color: #6b7494;
  text-transform: uppercase; letter-spacing: .06em;
  display: block; margin-bottom: 5px;
}

/* ── Toast ──────────────────────────────── */
#alert_toast {
  position: fixed; bottom: 22px; right: 22px;
  min-width: 230px; border-radius: 10px; z-index: 9999;
  box-shadow: 0 6px 20px rgba(0,0,0,.18);
}
#alert_toast .toast-body { font-size: 13px; font-weight: 600; padding: 12px 16px; color: #fff; }

/* ── Login page ─────────────────────────── */
.login-page-wrap {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 24px; background: #eef1f8;
}
.login-card-box { width: 100%; max-width: 400px; }
.login-card-inner {
  background: #fff; border-radius: 16px;
  padding: 36px 32px;
  box-shadow: 0 8px 32px rgba(29,43,79,.12);
  border: 1px solid #eaecf5;
}
