/* ==========================================================================
   SELORMART — Seller Dashboard styles
   Admin-panel layout: fixed sidebar + top bar + scrollable content
   ========================================================================== */

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

.dash-shell{display:flex;min-height:100vh;}

/* ---- Sidebar ---- */
.dash-sidebar{
  width:250px;flex-shrink:0;background:var(--ink-fixed);color:#d6d7db;display:flex;flex-direction:column;
  position:fixed;top:0;left:0;bottom:0;z-index:300;transition:transform .3s;
}
.dash-sidebar-brand{display:flex;align-items:center;gap:10px;padding:22px 22px 18px;border-bottom:1px solid rgba(255,255,255,.08);}
.dash-sidebar-brand img{height:26px;background:#fff;padding:5px 10px;border-radius:8px;}
.dash-sidebar-brand span{font-size:11px;color:rgba(255,255,255,.5);font-weight:600;letter-spacing:.4px;text-transform:uppercase;}

.dash-nav{flex:1;overflow-y:auto;padding:16px 12px;}
.dash-nav-label{font-size:10.5px;font-weight:700;text-transform:uppercase;letter-spacing:.6px;color:rgba(255,255,255,.35);padding:14px 12px 8px;}
.dash-nav a{
  display:flex;align-items:center;gap:12px;padding:11px 12px;border-radius:9px;font-size:13.8px;font-weight:600;
  color:rgba(255,255,255,.72);margin-bottom:3px;transition:.2s;position:relative;
}
.dash-nav a i{width:18px;text-align:center;font-size:15px;}
.dash-nav a:hover{background:rgba(255,255,255,.06);color:#fff;}
.dash-nav a.active{background:var(--accent);color:#fff;}
.dash-nav a .badge{
  margin-left:auto;background:rgba(255,255,255,.18);color:#fff;font-size:10.5px;font-weight:700;
  padding:2px 7px;border-radius:100px;
}
.dash-nav a.active .badge{background:rgba(255,255,255,.28);}

.dash-sidebar-foot{padding:14px 22px 20px;border-top:1px solid rgba(255,255,255,.08);}
.dash-sidebar-foot a{display:flex;align-items:center;gap:10px;font-size:13px;color:rgba(255,255,255,.6);font-weight:600;}
.dash-sidebar-foot a:hover{color:#fff;}

/* ---- Main column ---- */
.dash-main{flex:1;min-width:0;margin-left:250px;display:flex;flex-direction:column;min-height:100vh;}

.dash-topbar{
  height:66px;background:var(--surface);border-bottom:1px solid var(--border);display:flex;align-items:center;
  justify-content:space-between;padding:0 26px;position:sticky;top:0;z-index:200;gap:16px;
}
.dash-burger{display:none;font-size:19px;color:var(--ink);}
.dash-search{
  flex:1;max-width:380px;display:flex;align-items:center;gap:10px;background:var(--surface-2);border:1px solid var(--border);
  border-radius:8px;padding:9px 14px;
}
.dash-search input{border:none;background:transparent;outline:none;font-size:13.5px;color:var(--ink);flex:1;}
.dash-search i{color:var(--gray-500);}
.dash-topbar-right{display:flex;align-items:center;gap:8px;flex-shrink:0;}
.dash-icon-btn{
  width:40px;height:40px;border-radius:50%;display:flex;align-items:center;justify-content:center;color:var(--ink-soft);
  position:relative;transition:.2s;flex-shrink:0;
}
.dash-icon-btn:hover{background:var(--surface-2);}
.dash-icon-btn .dot{position:absolute;top:8px;right:9px;width:8px;height:8px;border-radius:50%;background:var(--accent);border:2px solid var(--surface);}
.dash-profile{display:flex;align-items:center;gap:10px;padding:6px 10px 6px 6px;border-radius:100px;transition:.2s;cursor:pointer;}
.dash-profile:hover{background:var(--surface-2);}
.dash-profile img, .dash-profile .avatar-fallback{width:36px;height:36px;border-radius:50%;object-fit:cover;background:var(--accent);color:#fff;display:flex;align-items:center;justify-content:center;font-weight:700;font-size:14px;flex-shrink:0;}
.dash-profile .who{display:flex;flex-direction:column;line-height:1.25;}
.dash-profile .who strong{font-size:13px;}
.dash-profile .who span{font-size:11px;color:var(--gray-500);}
.dash-profile i.fa-chevron-down{font-size:10px;color:var(--gray-500);margin-left:2px;}

.dash-body-scroll{padding:26px;flex:1;}

/* ---- Page head ---- */
.dash-page-head{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:14px;margin-bottom:22px;}
.dash-page-head h1{font-size:23px;}
.dash-page-head p{font-size:13.5px;color:var(--gray-500);margin-top:3px;}

/* ---- Stat cards ---- */
.dash-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:18px;margin-bottom:24px;}
.dash-stat-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-m);padding:20px;}
.dash-stat-card-top{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px;}
.dash-stat-ic{width:42px;height:42px;border-radius:11px;display:flex;align-items:center;justify-content:center;font-size:18px;color:#fff;flex-shrink:0;}
.dash-stat-trend{font-size:12px;font-weight:700;display:flex;align-items:center;gap:4px;}
.dash-stat-trend.up{color:var(--green);}
.dash-stat-trend.down{color:var(--accent);}
.dash-stat-card .num{font-family:var(--font-display);font-size:25px;font-weight:700;margin-bottom:4px;}
.dash-stat-card .label{font-size:12.8px;color:var(--gray-500);font-weight:600;}

/* ---- Panels (chart / lists / tables) ---- */
.dash-grid-2{display:grid;grid-template-columns:1.6fr 1fr;gap:18px;margin-bottom:18px;align-items:start;min-width:0;}
.dash-grid-2 > *{min-width:0;}
.dash-panel{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-m);padding:20px 22px;min-width:0;}
.dash-panel-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:18px;gap:10px;flex-wrap:wrap;}
.dash-panel-head h3{font-size:15.5px;}
.dash-panel-head .sub{font-size:12px;color:var(--gray-500);margin-top:2px;}
.dash-panel-head select{border:1px solid var(--border);border-radius:6px;padding:6px 10px;font-size:12.5px;font-weight:600;background:var(--surface-2);color:var(--ink);}
.dash-panel-head a{font-size:12.5px;font-weight:700;color:var(--accent);}

.chart-wrap{position:relative;height:260px;}

/* ---- Top products list ---- */
.top-product-item{display:flex;align-items:center;gap:12px;padding:11px 0;border-bottom:1px solid var(--border);}
.top-product-item:last-child{border-bottom:none;padding-bottom:0;}
.top-product-item img{width:46px;height:46px;border-radius:8px;object-fit:cover;background:var(--surface-2);flex-shrink:0;}
.top-product-item .info{flex:1;min-width:0;}
.top-product-item .info h5{font-size:13px;font-weight:600;margin-bottom:3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.top-product-item .info span{font-size:11.5px;color:var(--gray-500);}
.top-product-item .rev{font-size:13px;font-weight:700;color:var(--ink);text-align:right;flex-shrink:0;}
.top-product-item .rev small{display:block;font-size:10.5px;color:var(--green);font-weight:600;}

/* ---- Orders table ---- */
.dash-table-wrap{overflow-x:auto;}
.dash-table{width:100%;border-collapse:collapse;font-size:13.3px;}
.dash-table th{
  text-align:left;padding:11px 14px;font-size:11.5px;font-weight:700;text-transform:uppercase;letter-spacing:.3px;
  color:var(--gray-500);border-bottom:1.5px solid var(--border);white-space:nowrap;
}
.dash-table td{padding:13px 14px;border-bottom:1px solid var(--border);vertical-align:middle;white-space:nowrap;}
.dash-table tr:last-child td{border-bottom:none;}
.dash-table .prod-cell{display:flex;align-items:center;gap:10px;white-space:normal;}
.dash-table .prod-cell img{width:38px;height:38px;border-radius:7px;object-fit:cover;background:var(--surface-2);flex-shrink:0;}
.dash-table .prod-cell span{font-weight:600;font-size:13px;max-width:220px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:block;}
.status-pill{display:inline-flex;align-items:center;gap:6px;padding:5px 11px;border-radius:100px;font-size:11.5px;font-weight:700;}
.status-pill::before{content:"";width:6px;height:6px;border-radius:50%;}
.status-pill.pending{background:rgba(255,160,0,.12);color:#a66d00;}
.status-pill.pending::before{background:var(--amber);}
.status-pill.processing{background:rgba(30,111,227,.1);color:#1e6fe3;}
.status-pill.processing::before{background:#1e6fe3;}
.status-pill.shipped{background:rgba(155,60,230,.1);color:#7a1fc0;}
.status-pill.shipped::before{background:#9b3ce6;}
.status-pill.delivered{background:rgba(27,156,90,.12);color:var(--green);}
.status-pill.delivered::before{background:var(--green);}
.status-pill.cancelled{background:rgba(227,30,36,.1);color:var(--accent);}
.status-pill.cancelled::before{background:var(--accent);}
.dash-table .row-action{color:var(--gray-500);width:32px;height:32px;border-radius:8px;display:inline-flex;align-items:center;justify-content:center;}
.dash-table .row-action:hover{background:var(--surface-2);color:var(--accent);}

/* ---- Store performance mini panel ---- */
.perf-row{display:flex;align-items:center;justify-content:space-between;padding:11px 0;border-bottom:1px dashed var(--border);}
.perf-row:last-child{border-bottom:none;}
.perf-row .label{font-size:12.8px;color:var(--gray-500);font-weight:600;}
.perf-row .val{font-size:13.3px;font-weight:700;}
.perf-row .val.good{color:var(--green);}
.perf-bar{width:100%;height:6px;background:var(--surface-2);border-radius:6px;overflow:hidden;margin-top:6px;}
.perf-bar i{display:block;height:100%;border-radius:6px;background:var(--green);}

/* ---- Quick actions ---- */
.quick-actions{display:flex;gap:12px;flex-wrap:wrap;margin-bottom:24px;}
.quick-actions .btn{padding:11px 20px;}

/* ---- Mobile overlay ---- */
.dash-overlay{position:fixed;inset:0;background:rgba(0,0,0,.5);z-index:290;opacity:0;visibility:hidden;transition:.25s;}
.dash-overlay.show{opacity:1;visibility:visible;}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width:1180px){
  .dash-stats{grid-template-columns:repeat(2,1fr);}
  .dash-grid-2{grid-template-columns:1fr;}
}
@media (max-width:980px){
  .dash-sidebar{transform:translateX(-100%);}
  .dash-sidebar.open{transform:translateX(0);}
  .dash-main{margin-left:0;}
  .dash-burger{display:block;}
  .dash-search{display:none;}
}
@media (max-width:640px){
  .dash-stats{grid-template-columns:1fr 1fr;gap:12px;}
  .dash-body-scroll{padding:16px;}
  .dash-topbar{padding:0 14px;}
  .dash-profile .who{display:none;}
  .quick-actions{flex-direction:column;}
  .quick-actions .btn{width:100%;}
}
