@charset "UTF-8";
/*
  供货市场 - 订单页面样式 | t=9
  现代简约风格
  响应式设计: PC ≥992px | 平板 768-991px | 移动 <768px
  手机端卡片式订单列表
*/



/* ====================== CSS 变量 ====================== */
:root {
  --primary: #00C9A7;
  --primary-light: #00A88F;
  --primary-dark: #008E7A;
  --bg-page: #f5f5f5;
  --bg-card: #ffffff;
  --bg-light: #fafafa;
  --text-primary: #333333;
  --text-secondary: #666666;
  --text-muted: #999999;
  --border-color: #e5e5e5;
  --border-light: #f0f0f0;
  --success: #67c23a;
  --warning: #e6a23c;
  --danger: #f56c6c;
  --info: #909399;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.08);
}

body {
  color: var(--text-primary);
  background-color: var(--bg-page);
}

/* ====================== 订单页面容器 ====================== */
.ypui-supply-order {
  display: flex;
  gap: 20px;
  padding: 20px 0;
  max-width: 1400px;
  margin: 0 auto;
}

/* ====================== 左侧菜单 - PC端简约风格 ====================== */
@media (min-width: 768px) {
  .order-menu {
    width: 200px;
    flex-shrink: 0;
    background: #ffffff;
    border-radius: var(--radius-lg);
    padding: 20px 0;
    box-shadow: var(--shadow-sm);
  }

  /* 菜单标题 */
  .order-menu-title {
    padding: 0 20px 15px;
    margin-bottom: 15px;
    font-size: 16px;
    font-weight: 600;
    color: #333333;
    border-bottom: 1px solid var(--border-light);
  }

  /* Layui 导航菜单 */
  .order-menu .layui-nav {
    background: transparent !important;
    width: 100%;
    padding: 0;
  }

  .order-menu .layui-nav-tree {
    background: transparent !important;
  }

  /* 父级菜单项 */
  .order-menu .layui-nav-item {
    background: transparent !important;
  }

  .order-menu .layui-nav-item > a {
    color: #333333 !important;
    font-size: 15px;
    font-weight: 500;
    padding: 14px 20px !important;
    border-left: 3px solid transparent;
    transition: all 0.2s;
  }

  .order-menu .layui-nav-item > a:hover {
    color: #00C9A7 !important;
    background: transparent !important;
  }

  /* 展开的父菜单 */
  .order-menu .layui-nav-itemed > a {
    color: #00C9A7 !important;
    border-left-color: #00C9A7;
  }

  /* 子菜单 */
  .order-menu .layui-nav-child {
    background: transparent !important;
  }

  .order-menu .layui-nav-child dd {
    background: transparent !important;
  }

  .order-menu .layui-nav-child dd a {
    color: #666666 !important;
    font-size: 14px;
    padding: 11px 20px 11px 40px !important;
    border-left: 3px solid transparent;
    transition: all 0.2s;
  }

  .order-menu .layui-nav-child dd a:hover {
    color: #00C9A7 !important;
    background: transparent !important;
  }

  /* 当前选中项 */
  .order-menu .layui-nav-child dd.layui-this {
    background: transparent !important;
  }

  .order-menu .layui-nav-child dd.layui-this a {
    color: #00C9A7 !important;
    border-left-color: #00C9A7;
    font-weight: 500;
    background: transparent !important;
  }

  /* 移除箭头 */
  .order-menu .layui-nav-more {
    display: none !important;
  }
}

/* ====================== 右侧内容区 ====================== */
.order-list {
  flex: 1;
  min-width: 0;
}

/* ====================== 页面标题 ====================== */
.order-list-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 2px solid var(--primary);
}

.order-list-title a {
  color: var(--primary);
  text-decoration: none;
}

/* ====================== 状态 Tab 切换 - 现代简约 ====================== */
.order-list-wrap {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 0;
  overflow: hidden;
}

.ypui-table-tab {
  position: relative;
  border-bottom: 1px solid var(--border-light);
}

/* Tab 标题容器 - 支持横向滚动 */
.ypui-table-tab .layui-tab-title {
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  border-bottom: none;
  background: var(--bg-light);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* Firefox 隐藏滚动条 */
  -ms-overflow-style: none;
}

.ypui-table-tab .layui-tab-title::-webkit-scrollbar {
  display: none;
}

.ypui-table-tab .layui-tab-title li {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 15px 20px;
  font-size: 14px;
  color: var(--text-secondary);
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  line-height: 1.2;
}

.ypui-table-tab .layui-tab-title li:hover {
  color: var(--primary);
}

.ypui-table-tab .layui-tab-title li.layui-this {
  color: var(--primary);
  font-weight: 500;
  border-bottom-color: var(--primary);
  background: var(--bg-card);
}

.ypui-table-tab .layui-tab-content {
  padding: 20px;
}

/* ====================== 订单卡片 - 现代简约 ====================== */
.order-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  margin-bottom: 15px;
  overflow: hidden;
  transition: box-shadow 0.2s;
}

.order-card:hover {
  box-shadow: var(--shadow-md);
}

.order-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 15px;
  background: var(--bg-light);
  border-bottom: 1px solid var(--border-light);
}

.order-card-header .order-time {
  font-size: 13px;
  color: var(--text-muted);
}

.order-card-header .order-no {
  font-size: 13px;
  color: var(--text-secondary);
}

.order-card-header .order-status {
  font-size: 13px;
  color: var(--primary);
  font-weight: 500;
}

.order-card-body {
  padding: 15px;
}

.order-card-goods {
  display: flex;
  gap: 12px;
  margin-bottom: 15px;
}

.order-card-goods .goods-img {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
}

.order-card-goods .goods-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.order-card-goods .goods-info {
  flex: 1;
  min-width: 0;
}

.order-card-goods .goods-name {
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 8px;
  cursor: pointer;
}

.order-card-goods .goods-name:hover {
  color: var(--primary);
}

.order-card-goods .goods-meta {
  font-size: 12px;
  color: var(--text-muted);
}

.order-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 15px;
  border-top: 1px dashed var(--border-light);
}

.order-card-price {
  font-size: 14px;
  color: var(--text-secondary);
}

.order-card-price strong {
  color: var(--primary);
  font-size: 18px;
  font-weight: 600;
}

.order-card-actions {
  display: flex;
  gap: 10px;
}

/* ====================== 订单详情页 - 现代简约 ====================== */
.order-detail {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 20px;
}

/* 订单状态卡片 */
.order-detail .order-status {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 20px;
}

.order-detail .order-status h4 {
  font-size: 18px;
  margin: 0 0 10px 0;
}

.order-detail .order-status .go-pay {
  font-size: 14px;
  opacity: 0.9;
}

.order-detail .order-status .go-pay span {
  font-size: 24px;
  font-weight: bold;
}

.order-detail .order-status .operation {
  margin-top: 15px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.order-detail .order-status .operation .layui-btn {
  height: 36px;
  padding: 0 20px;
  border-radius: 18px;
  font-size: 14px;
}

.order-detail .order-status .operation .layui-btn-primary {
  background: rgba(255,255,255,0.2);
  color: #fff;
  border: none;
}

.order-detail .order-status .operation .layui-btn-normal {
  background: #fff;
  color: var(--primary);
  border: none;
}

/* 信息卡片 */
.order-detail .order-info,
.order-detail .take-delivery-info {
  background: var(--bg-light);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 15px;
}

.order-detail .order-info h4,
.order-detail .take-delivery-info h4 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 15px 0;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-light);
}

.order-detail .order-info ul,
.order-detail .take-delivery-info ul {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.order-detail .order-info li,
.order-detail .take-delivery-info li {
  font-size: 14px;
  color: var(--text-secondary);
}

.order-detail .order-info li span,
.order-detail .take-delivery-info li span {
  color: var(--text-muted);
}

/* 商品列表 - 卡片式 */
.order-detail .goods-list-card {
  margin-bottom: 15px;
}

.goods-card-item {
  display: flex;
  gap: 15px;
  padding: 15px;
  background: var(--bg-light);
  border-radius: var(--radius-md);
  margin-bottom: 10px;
}

.goods-card-item .goods-img {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
}

.goods-card-item .goods-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.goods-card-item .goods-info {
  flex: 1;
  min-width: 0;
}

.goods-card-item .goods-name {
  font-size: 14px;
  color: var(--text-primary);
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.goods-card-item .goods-price {
  font-size: 14px;
  color: var(--text-secondary);
}

.goods-card-item .goods-num {
  font-size: 14px;
  color: var(--text-secondary);
}

.goods-card-item .goods-subtotal {
  font-size: 16px;
  font-weight: 600;
  color: var(--primary);
}

/* 费用明细 */
.order-detail .total {
  background: var(--bg-light);
  border-radius: var(--radius-lg);
  padding: 20px;
  text-align: right;
}

.order-detail .total li {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 8px 0;
  font-size: 14px;
  color: var(--text-secondary);
}

.order-detail .total li label {
  width: 100px;
  display: inline-block;
}

.order-detail .total li span {
  width: 120px;
  display: inline-block;
}

.order-detail .total li.pay-money {
  font-size: 18px;
  font-weight: 600;
  color: var(--primary);
  padding-top: 15px;
  margin-top: 10px;
  border-top: 1px solid var(--border-light);
}

.order-detail .total li.pay-money span {
  font-size: 22px;
}

/* ====================== 分页 ====================== */
#order_page {
  text-align: center;
  padding: 30px 0;
}

/* ====================== 手机端卡片式订单列表 < 768px ====================== */
.mobile-order-list {
  padding: 0;
}

.mobile-order-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  margin: 0 15px 15px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

/* 卡片头部 */
.mobile-order-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 15px;
  border-bottom: 1px solid var(--border-light);
}

.mobile-order-time {
  font-size: 12px;
  color: var(--text-muted);
}

.mobile-order-status {
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 12px;
  font-weight: 500;
}

.status-pending {
  background: #fff7e6;
  color: #fa8c16;
}

.status-paid {
  background: #e6f7ff;
  color: #1890ff;
}

.status-shipped {
  background: #f0f5ff;
  color: #597ef7;
}

.status-received, .status-complete {
  background: #f6ffed;
  color: #52c41a;
}

.status-closed {
  background: #f5f5f5;
  color: #999;
}

/* 商家信息 */
.mobile-order-shop {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 15px;
  font-size: 13px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-light);
  background: var(--bg-light);
}

.mobile-order-shop i {
  color: var(--primary);
}

/* 商品列表 */
.mobile-goods-list {
  padding: 12px 15px;
}

.mobile-goods-item {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--border-light);
  cursor: pointer;
}

.mobile-goods-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.mobile-goods-item:first-child {
  padding-top: 0;
}

.mobile-goods-img {
  width: 65px;
  height: 65px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg-light);
}

.mobile-goods-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mobile-goods-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.mobile-goods-name {
  font-size: 14px;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
}

.mobile-goods-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 6px;
}

.mobile-goods-price {
  font-size: 14px;
  color: var(--text-secondary);
}

.mobile-goods-num {
  font-size: 13px;
  color: var(--text-muted);
}

.mobile-goods-refund {
  margin-top: 6px;
  font-size: 12px;
  color: #fa8c16;
}

/* 卡片底部 */
.mobile-order-footer {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px 15px;
  border-top: 1px solid var(--border-light);
  background: var(--bg-light);
}

.mobile-order-price {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}

.price-label {
  font-size: 13px;
  color: var(--text-muted);
}

.price-value {
  font-size: 18px;
  font-weight: 600;
  color: var(--primary);
}

.mobile-order-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.mobile-order-actions .layui-btn {
  height: 30px;
  padding: 0 18px;
  font-size: 13px;
  border-radius: 15px;
  line-height: 30px;
}

.mobile-order-actions .layui-btn-danger {
  background: var(--primary);
  color: #fff;
}

.mobile-detail-link {
  font-size: 13px;
  color: #1890ff;
  text-decoration: none;
}

/* 空状态 */
.mobile-order-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.mobile-order-empty i {
  font-size: 48px;
  display: block;
  margin-bottom: 15px;
}

/* ====================== 移动端响应式 < 768px ====================== */
@media only screen and (max-width: 767px) {
  .ypui-supply-order {
    display: block;
    padding: 10px 0 100px 0;
  }

  /* 隐藏左侧菜单 */
  .order-menu {
    display: none;
  }

  .order-list {
    width: 100%;
  }

  .order-list-title {
    font-size: 18px;
    padding: 0 15px 15px;
    margin: 0;
    border: none;
  }

  /* Tab 横向滚动优化 */
  .order-list-wrap {
    margin: 0 -15px;
    background: var(--bg-card);
  }

  .ypui-table-tab {
    border-bottom: none;
  }

  .ypui-table-tab .layui-tab-title {
    padding: 0;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    touch-action: pan-x;
    -webkit-user-select: none;
    user-select: none;
  }

  .ypui-table-tab .layui-tab-title::-webkit-scrollbar {
    display: none;
  }

  .ypui-table-tab .layui-tab-title li {
    -webkit-tap-highlight-color: transparent;
  }

  .ypui-table-tab .layui-tab-title li {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 16px;
    font-size: 14px;
  }

  .ypui-table-tab .layui-tab-content {
    padding: 15px;
  }

  /* PC端表格隐藏 */
  .ypui-supply-order .layui-table {
    display: none;
  }

  /* 手机端卡片列表显示 */
  .mobile-order-list {
    display: block;
  }

  /* 订单详情优化 */
  .order-detail {
    padding: 15px;
  }

  .order-detail .order-status {
    padding: 15px;
    border-radius: var(--radius-md);
  }

  .order-detail .order-status h4 {
    font-size: 16px;
  }

  .order-detail .order-status .go-pay span {
    font-size: 20px;
  }

  .order-detail .order-status .operation {
    gap: 8px;
  }

  .order-detail .order-status .operation .layui-btn {
    height: 32px;
    padding: 0 15px;
    font-size: 13px;
    border-radius: 16px;
  }

  .order-detail .order-info,
  .order-detail .take-delivery-info {
    padding: 15px;
    border-radius: var(--radius-md);
  }

  .order-detail .order-info h4,
  .order-detail .take-delivery-info h4 {
    font-size: 15px;
  }

  .order-detail .order-info ul,
  .order-detail .take-delivery-info ul {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .order-detail .order-info li,
  .order-detail .take-delivery-info li {
    font-size: 13px;
  }

  /* 商品卡片 */
  .goods-card-item {
    padding: 12px;
    border-radius: var(--radius-sm);
  }

  .goods-card-item .goods-img {
    width: 70px;
    height: 70px;
  }

  .goods-card-item .goods-name {
    font-size: 13px;
  }

  /* 费用明细 */
  .order-detail .total {
    padding: 15px;
    border-radius: var(--radius-md);
  }

  .order-detail .total li {
    font-size: 13px;
    padding: 6px 0;
  }

  .order-detail .total li label {
    width: 80px;
  }

  .order-detail .total li span {
    width: 100px;
  }

  .order-detail .total li.pay-money span {
    font-size: 18px;
  }
}