/* ===== Base Reset ===== */
*{margin:0;padding:0;box-sizing:border-box;}
html,body{height:100%;}
body{
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ===== Tables ===== */
.table-container{overflow-x:auto;}
table{width:100%; border-collapse: collapse;}
th{
  text-align:left;
  padding: 12px 14px;
  font-size: 12px;
  font-weight: 750;
  color: rgba(17,24,39,.72);
  border-bottom: 1px solid var(--border);
  background: rgba(249,250,251,.9);
}
td{
  padding: 12px 14px;
  font-size: 14px;
  border-bottom: 1px solid rgba(15,23,42,.06);
  color: rgba(17,24,39,.92);
  vertical-align: top;
}
tr:hover{background: rgba(37,99,235,.04);}
.order-row{cursor:pointer;}

/* 产品分组视觉优化 */
#productsTable tr td[rowspan] {
    vertical-align: middle;
    font-weight: 500;
    background: #f9fafb;
    border-right: 2px solid #e5e7eb;
}

td.price, th.price{ text-align:right; font-variant-numeric: tabular-nums; }
td.actions{ width: 220px; }
td.uploader{ white-space: nowrap; }

/* ===== Empty State ===== */
.empty-state{ text-align:center; padding: 44px 16px; color: var(--muted); font-size: 14px; }

/* ===== Toast ===== */
.toast{
  position: fixed;
  top: 18px;
  right: 18px;
  background: rgba(17,24,39,.92);
  color: white;
  padding: 12px 14px;
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  z-index: 10000;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity .2s ease, transform .2s ease;
  pointer-events:none;
  font-size: 13px;
  font-weight: 650;
}
.toast.show{opacity: 1; transform: translateY(0);}
.toast.success{background: rgba(22,163,74,.92);}
.toast.error{background: rgba(220,38,38,.92);}

/* ===== Responsive ===== */
@media (max-width: 980px){
  .sidebar{position: sticky; width: 100%; height:auto;}
  .main-content{margin-left: 0; width: 100%;}
}
@media (max-width: 768px){
  .main-content{padding: 18px;}
  .content-inner{max-width: 100%;}
  .search-bar{padding: 12px;}
  .action-buttons{flex-direction: column;}
  .action-btn{width: 100%;}
  .modal-content{padding: 16px;}
}
