/* ==========================================================================
   DASHBOARD SHELL (dashboard-shell.css)
   Shared by Vendor Panel + Admin Panel: sidebar + topbar layout
   ========================================================================== */

body.dash-body { background: var(--bg-shell); }

.dash-sidebar {
  position: fixed; top: 0; left: 0; bottom: 0; width: var(--sidebar-w); background: var(--navy-950);
  z-index: 150; display: flex; flex-direction: column; transition: width var(--t-base) var(--ease);
}
.dash-sidebar-brand {
  height: var(--topbar-h); display: flex; align-items: center; gap: 10px; padding: 0 20px;
  border-bottom: 1px solid rgba(255,255,255,0.08); flex-shrink: 0;
}
.dash-sidebar-brand img { height: 32px; flex-shrink: 0; }
.dash-sidebar-brand span { color: #fff; font-family: var(--font-display); font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; }
.dash-sidebar-brand .panel-tag { font-size: 9.5px; font-weight: 700; letter-spacing: .05em; color: var(--gold-400); display: block; }

.dash-nav { flex: 1; overflow-y: auto; padding: 14px 12px; }
.dash-nav .nav-label { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #5F77A8; padding: 16px 10px 7px; white-space: nowrap; }
.dash-nav a {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r-md); margin-bottom: 2px;
  font-size: 13.5px; font-weight: 500; color: #B8C6E8; white-space: nowrap; overflow: hidden;
}
.dash-nav a svg { width: 18px; height: 18px; flex-shrink: 0; }
.dash-nav a:hover { background: rgba(255,255,255,0.06); color: #fff; }
.dash-nav a.active { background: var(--blue-600); color: #fff; }
.dash-nav a .nav-text { overflow: hidden; text-overflow: ellipsis; }
.dash-nav a .nav-badge { margin-left: auto; background: var(--red-600); color: #fff; font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: var(--r-pill); flex-shrink:0; }

.dash-sidebar-foot { padding: 14px 12px; border-top: 1px solid rgba(255,255,255,0.08); flex-shrink: 0; }
.dash-sidebar-foot a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r-md); font-size: 13px; color: #B8C6E8; }
.dash-sidebar-foot a:hover { background: rgba(255,255,255,0.06); color: #fff; }
.dash-sidebar-foot a svg { width: 17px; height: 17px; flex-shrink: 0; }

.dash-main { margin-left: var(--sidebar-w); min-height: 100vh; transition: margin-left var(--t-base) var(--ease); }
.dash-topbar {
  height: var(--topbar-h); background: var(--white); border-bottom: 1px solid var(--border-soft); position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between; padding: 0 26px;
}
.dash-topbar .dt-left { display: flex; align-items: center; gap: 16px; }
.dash-topbar .sidebar-toggle-btn { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; color: var(--gray-600); border-radius: var(--r-md); }
.dash-topbar .sidebar-toggle-btn:hover { background: var(--gray-100); }
.dash-topbar .sidebar-toggle-btn svg { width: 20px; height: 20px; }
.dash-topbar h1 { font-size: 17px; }
.dash-topbar .dt-right { display: flex; align-items: center; gap: 18px; }
.dash-topbar .dt-icon-btn { position: relative; width: 38px; height: 38px; display: flex; align-items: center; justify-content: center; border-radius: var(--r-md); color: var(--gray-600); }
.dash-topbar .dt-icon-btn:hover { background: var(--gray-100); }
.dash-topbar .dt-icon-btn svg { width: 20px; height: 20px; }
.dash-topbar .dt-icon-btn .dot { position: absolute; top: 7px; right: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--red-600); border: 1.5px solid #fff; }
.dash-topbar .dt-profile { display: flex; align-items: center; gap: 10px; padding-left: 14px; border-left: 1px solid var(--border-soft); }
.dash-topbar .dt-profile .avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--blue-600); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; font-family: var(--font-display); }
.dash-topbar .dt-profile .info { line-height: 1.2; }
.dash-topbar .dt-profile .info strong { font-size: 13px; display: block; }
.dash-topbar .dt-profile .info span { font-size: 11px; color: var(--text-muted); }

.dash-content { padding: 26px; max-width: 100%; overflow-x: hidden; }
.dash-grid-2, .dash-stat-grid { min-width: 0; }
.panel-card { min-width: 0; }
.table-wrap { max-width: 100%; }

/* Collapsed state (desktop) */
body.sidebar-collapsed .dash-sidebar { width: 76px; }
body.sidebar-collapsed .dash-main { margin-left: 76px; }
body.sidebar-collapsed .dash-sidebar-brand span,
body.sidebar-collapsed .dash-nav .nav-label,
body.sidebar-collapsed .dash-nav a .nav-text,
body.sidebar-collapsed .dash-nav a .nav-badge,
body.sidebar-collapsed .dash-sidebar-foot a span { display: none; }
body.sidebar-collapsed .dash-nav a { justify-content: center; }
body.sidebar-collapsed .dash-sidebar-foot a { justify-content: center; }

@media (max-width: 1080px) {
  .dash-sidebar { transform: translateX(-100%); transition: transform var(--t-base) var(--ease); width: 264px; }
  body.sidebar-mobile-open .dash-sidebar { transform: translateX(0); }
  .dash-main { margin-left: 0; }
  body.sidebar-collapsed .dash-main { margin-left: 0; }
  .dash-mobile-overlay { display: none; position: fixed; inset: 0; background: rgba(10,25,53,0.5); z-index: 140; }
  body.sidebar-mobile-open .dash-mobile-overlay { display: block; }
}
@media (max-width: 768px) {
  .dash-content { padding: 16px; }
  .dash-topbar { padding: 0 14px; }
  .dash-topbar h1 { font-size: 15px; }
  .dt-profile .info { display: none; }
}

/* ---------- Dashboard widgets ---------- */
.dash-stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin-bottom: 22px; }
@media (max-width: 1080px) { .dash-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .dash-stat-grid { grid-template-columns: minmax(0, 1fr); } }

.dash-grid-2 { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 18px; }
@media (max-width: 1080px) { .dash-grid-2 { grid-template-columns: minmax(0, 1fr); } }

.panel-card { background: var(--white); border: 1px solid var(--border-soft); border-radius: var(--r-lg); padding: 22px; }
.panel-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.panel-card-head h3 { font-size: 15px; }
.panel-card-head .pch-sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* Simple bar chart (CSS only, no JS lib needed) */
.mini-bar-chart { display: flex; align-items: flex-end; gap: 10px; height: 180px; padding-top: 10px; }
.mini-bar-chart .bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; justify-content: flex-end; }
.mini-bar-chart .bar { width: 100%; max-width: 36px; background: linear-gradient(180deg, var(--blue-500), var(--blue-600)); border-radius: 6px 6px 0 0; transition: height 1s var(--ease); }
.mini-bar-chart .bar-label { font-size: 11px; color: var(--text-muted); }

.progress-track { height: 8px; background: var(--gray-200); border-radius: var(--r-pill); overflow: hidden; }
.progress-track .progress-fill { height: 100%; border-radius: var(--r-pill); background: var(--blue-600); }

.kv-row { display: flex; justify-content: space-between; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--border-soft); font-size: 13px; }
.kv-row:last-child { border-bottom: none; }
.kv-row span:first-child { color: var(--text-secondary); }
.kv-row span:last-child { font-weight: 600; color: var(--gray-900); }

.activity-item { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border-soft); }
.activity-item:last-child { border-bottom: none; }
.activity-item .act-ic { width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.activity-item .act-ic svg { width: 16px; height: 16px; }
.activity-item p { font-size: 13px; color: var(--gray-800); }
.activity-item span { font-size: 11.5px; color: var(--text-muted); }

.upload-drop {
  border: 2px dashed var(--border-default); border-radius: var(--r-md); padding: 30px; text-align: center; cursor: pointer;
}
.upload-drop:hover { border-color: var(--blue-400); background: var(--blue-50); }
.upload-drop svg { width: 30px; height: 30px; color: var(--blue-600); margin: 0 auto 10px; }

.toggle-row { display: flex; align-items: center; justify-content: space-between; padding: 13px 0; border-bottom: 1px solid var(--border-soft); }
.toggle-row:last-child { border-bottom: none; }
.toggle-row strong { font-size: 13.5px; display: block; }
.toggle-row span { font-size: 12px; color: var(--text-muted); }

.step-progress { display: flex; align-items: center; margin-bottom: 26px; }
.step-progress .sp-item { display: flex; flex-direction: column; align-items: center; gap: 8px; flex: 1; position: relative; }
.step-progress .sp-item:not(:last-child)::after { content: ""; position: absolute; top: 17px; left: 50%; width: 100%; height: 2px; background: var(--gray-200); z-index: 0; }
.step-progress .sp-item.done:not(:last-child)::after { background: var(--green-600); }
.step-progress .sp-circle { width: 34px; height: 34px; border-radius: 50%; background: var(--white); border: 2px solid var(--gray-300); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; color: var(--gray-500); z-index: 1; }
.step-progress .sp-item.done .sp-circle { background: var(--green-600); border-color: var(--green-600); color: #fff; }
.step-progress .sp-item.active .sp-circle { background: var(--blue-600); border-color: var(--blue-600); color: #fff; }
.step-progress .sp-item span { font-size: 11.5px; font-weight: 600; color: var(--text-secondary); }
.step-progress .sp-item.active span, .step-progress .sp-item.done span { color: var(--gray-900); }
