/* 手机端：店铺出单 / 商品明细 改成卡片，电脑端不受影响 */
@media (max-width: 760px) {
  /* 店铺出单 */
  .ss-total { grid-template-columns: repeat(3, 1fr) !important; gap: 8px !important; }
  .ss-kpi { padding: 8px 10px !important; border-radius: 10px !important; }
  .ss-kpi .l { font-size: 11px !important; }
  .ss-kpi .v { font-size: 17px !important; margin: 2px 0 !important; }
  .ss-kpi .ss-d { margin-left: 0 !important; }
  .ss-meta, .lp-meta { font-size: 11.5px !important; line-height: 1.5 !important; }
  .ss-wrap, .lp-wrap { overflow: visible !important; max-height: none !important; border: 0 !important; background: transparent !important; }
  .ss-table, .ss-table tbody, .lp-table, .lp-table tbody { display: block !important; width: 100% !important; }
  .ss-table thead, .lp-table thead { display: none !important; }
  .ss-table, .lp-table { min-width: 0 !important; }
  .ss-table td, .lp-table td { min-width: 0 !important; overflow-wrap: anywhere; }
  .ss-table tbody tr {
    display: grid !important; grid-template-columns: repeat(3, 1fr); gap: 8px 10px;
    background: #fff; border: 1px solid #e6e8ee; border-radius: 12px; padding: 12px; margin-bottom: 10px;
  }
  .ss-table tbody tr.loss { background: #fff5f4; border-color: #fecaca; }
  .ss-table td { display: block !important; padding: 0 !important; border: 0 !important; white-space: normal !important; font-size: 15px !important; }
  .ss-table td { background: transparent !important; }
  .ss-table td:first-child { grid-column: 1 / -1; font-size: 16px !important; }
  .ss-table td:first-child::after { content: '  ›'; color: #9ca3af; }
  .ss-table td:nth-child(n+2)::before { display: block; color: #6b7280; font-size: 11px; font-weight: 400; margin-bottom: 1px; }
  .ss-table td:nth-child(2)::before { content: '单数'; }
  .ss-table td:nth-child(3)::before { content: '消耗'; }
  .ss-table td:nth-child(4)::before { content: '成交'; }
  .ss-table td:nth-child(5)::before { content: '支付ROI'; }
  .ss-table td:nth-child(6)::before { content: '利润'; }
  .ss-table td:nth-child(7)::before { content: '每单利润'; }
  .ss-table td:nth-child(8)::before { content: '出单商品'; }
  .ss-table td:nth-child(9)::before { content: '亏钱商品'; }
  .ss-table td .ss-d { display: block; margin: 0 !important; }
  .ss-table td small { font-size: 10.5px; }

  /* 商品明细 */
  #lp-shops { flex-wrap: nowrap !important; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; }
  #lp-shops button { flex: 0 0 auto; white-space: nowrap; }
  .lp-table tbody tr.lp-row {
    display: grid !important; grid-template-columns: repeat(6, 1fr); gap: 6px 8px; align-items: start;
    background: #fff; border: 1px solid #e6e8ee; border-radius: 12px; padding: 10px; margin-top: 10px;
  }
  .lp-table tbody tr.lp-row.loss { background: #fff5f4; border-color: #fecaca; }
  .lp-table td { display: block !important; padding: 0 !important; border: 0 !important; white-space: normal !important; font-size: 14px !important; }
  .lp-row td:nth-child(1) { grid-column: 1 / 2; grid-row: 1 / 3; }
  .lp-row .lp-img { width: 52px !important; height: 52px !important; }
  .lp-row td:nth-child(2) { grid-column: 2 / 7; grid-row: 1; max-width: none !important; font-size: 13.5px !important; line-height: 1.4 !important; }
  .lp-row td:nth-child(3) { grid-column: 2 / 7; grid-row: 2; font-size: 11.5px !important; }
  .lp-row td:nth-child(n+4) { grid-column: span 2; }
  .lp-row td:nth-child(n+4)::before, .lp-plans td:nth-child(n+3)::before { display: block; color: #6b7280; font-size: 11px; font-weight: 400; }
  .lp-row td:nth-child(4)::before, .lp-plans td:nth-child(3)::before { content: '单数'; }
  .lp-row td:nth-child(5)::before, .lp-plans td:nth-child(4)::before { content: '消耗'; }
  .lp-row td:nth-child(6)::before, .lp-plans td:nth-child(5)::before { content: '成交'; }
  .lp-row td:nth-child(7)::before, .lp-plans td:nth-child(6)::before { content: '支付ROI'; }
  .lp-row td:nth-child(8)::before, .lp-plans td:nth-child(7)::before { content: '利润'; }
  .lp-row td:nth-child(9)::before, .lp-plans td:nth-child(8)::before { content: '每单利润'; }
  .lp-table tbody tr.lp-plans {
    display: grid !important; grid-template-columns: repeat(6, 1fr); gap: 4px 8px;
    background: #f8fafc; border: 1px solid #e6e8ee; border-left: 4px solid #c7d2fe; border-radius: 10px;
    padding: 8px 10px; margin: 6px 0 0 14px;
  }
  .lp-table tbody tr.lp-plans.loss { background: #fff5f4; border-left-color: #f87171; }
  .lp-plans td { background: transparent !important; border-left: 0 !important; font-size: 13px !important; }
  .lp-plans td:nth-child(1) { display: none !important; }
  .lp-plans td:nth-child(2) { grid-column: 1 / -1; font-size: 12.5px !important; }
  .lp-plans td:nth-child(n+3) { grid-column: span 2; }
}
@media (max-width:760px){
#appTopbar{display:flex!important;flex-direction:row!important;flex-wrap:nowrap!important;align-items:center!important;justify-content:space-between!important;gap:8px!important;height:52px!important;min-height:0!important;box-sizing:border-box!important;padding-top:6px!important;padding-bottom:6px!important}
#appTopbar .desktop-location{flex:1 1 auto;min-width:0}
#appTopbar .top-actions{flex:0 0 auto!important;width:auto!important;margin:0!important;padding:0!important;border:0!important}
#currentUserChip,#accountButton,#desktopPreviewBadge{display:none!important}
#logoutButton{padding:4px 10px!important;font-size:12px!important;min-height:0!important;height:auto!important}
#viewTabs{top:52px!important}
}
