/* 大西部商贸城 - 商户端样式 */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Microsoft YaHei', 'PingFang SC', sans-serif; background: #f5f6f8; color: #333; }

/* 头部导航 */
.merchant-header {
    background: #fff;
    border-bottom: 1px solid #e8e8e8;
    box-shadow: 0 1px 4px rgba(0,0,0,.04);
    position: sticky;
    top: 0;
    z-index: 100;
}
.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.header-inner .logo { font-size: 18px; font-weight: 700; color: #1a1a2e; text-decoration: none; }
.header-nav { display: flex; gap: 4px; }
.header-nav a {
    padding: 8px 16px;
    color: #555;
    text-decoration: none;
    font-size: 14px;
    border-radius: 6px;
    transition: all .2s;
}
.header-nav a:hover { background: #f0f2f5; color: #409eff; }
.header-nav .btn-logout { color: #f56c6c; }

/* 主体内容 */
.merchant-body { max-width: 1200px; margin: 0 auto; padding: 20px; min-height: calc(100vh - 120px); }

/* 页脚 */
.merchant-footer {
    text-align: center;
    padding: 20px;
    color: #aaa;
    font-size: 13px;
    border-top: 1px solid #e8e8e8;
    background: #fff;
}

/* 页面标题 */
.page-title { font-size: 22px; margin-bottom: 20px; color: #333; }

/* 面板卡片 */
.panel {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 1px 6px rgba(0,0,0,.04);
    overflow: hidden;
}
.panel-header {
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.panel-header h3 { font-size: 16px; color: #333; }
.panel-more { font-size: 13px; color: #409eff; text-decoration: none; }

/* 表格 */
.table {
    width: 100%;
    border-collapse: collapse;
}
.table th {
    background: #fafafa;
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    color: #666;
    border-bottom: 1px solid #f0f0f0;
}
.table td {
    padding: 12px 16px;
    font-size: 14px;
    border-bottom: 1px solid #f5f5f5;
}
.table tr:hover td { background: #fafbfc; }
.table .empty { text-align: center; color: #999; padding: 40px; }

/* 状态标签 */
.badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 12px;
}
.badge-pending { background: #fdf6ec; color: #e6a23c; }
.badge-paid { background: #ecf5ff; color: #409eff; }
.badge-processing { background: #e8f4fd; color: #00b4d8; }
.badge-completed { background: #f0f9eb; color: #67c23a; }
.badge-cancelled { background: #f4f4f5; color: #909399; }
.badge-refunded { background: #fef0f0; color: #f56c6c; }

/* 筛选 */
.filter-form { margin-bottom: 16px; }

/* 按钮 */
.btn-sm {
    display: inline-block;
    padding: 4px 12px;
    font-size: 12px;
    border-radius: 4px;
    color: #409eff;
    background: #ecf5ff;
    text-decoration: none;
}

/* 分页占位 */
.pagination { padding: 16px; text-align: center; }

/* 汉堡菜单按钮 */
.nav-toggle {
    display: none; background: none; border: none; font-size: 24px;
    cursor: pointer; color: #555; padding: 4px 8px;
}

/* 响应式 */
@media (max-width: 768px) {
    .nav-toggle { display: block; }
    .header-nav { display: none; position: absolute; top: 56px; left: 0; right: 0;
        background: #fff; flex-direction: column; padding: 12px;
        border-bottom: 1px solid #e8e8e8; box-shadow: 0 4px 12px rgba(0,0,0,.08); }
    .header-nav.active { display: flex; }
    .header-nav a { padding: 12px 16px; }
    .header-inner { position: relative; }
    .header-nav a { padding: 6px 10px; font-size: 13px; }
    .merchant-body { padding: 12px; }
}


/* Codex mobile compatibility patch - 20260522 */
@media (max-width: 768px) {
  html, body { width: 100%; overflow-x: hidden; }
  .merchant-header { position: sticky; top: 0; z-index: 200; }
  .header-inner { height: auto; min-height: 56px; padding: 10px 12px; }
  .header-inner .logo { font-size: 16px; line-height: 1.25; max-width: calc(100vw - 74px); }
  .header-nav { top: 56px; max-height: calc(100vh - 56px); overflow-y: auto; }
  .header-nav a { font-size: 14px; padding: 12px 14px; }
  .merchant-body { width: 100%; padding: 12px; }
  .hero-section { margin: -12px -12px 22px !important; padding: 46px 14px !important; }
  .hero-content h1 { font-size: 30px !important; line-height: 1.2; }
  .hero-content p { font-size: 15px !important; line-height: 1.7; }
  .hero-actions { flex-direction: column; align-items: stretch; gap: 10px !important; }
  .hero-actions .btn, .btn-login, .btn-register { width: 100%; justify-content: center; text-align: center; }
  .grid-cards { grid-template-columns: 1fr !important; gap: 12px !important; }
  .service-card { padding: 22px 16px !important; }
  .panel-header { flex-direction: column; align-items: flex-start; gap: 8px; }
  .panel { overflow: hidden; }
  .table { min-width: 680px; }
  .panel:has(.table) { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .filter-form .layui-inline, .layui-form-item .layui-inline { display: block; margin-right: 0; margin-bottom: 10px; }
  .layui-input, .layui-select, .layui-textarea { max-width: 100%; }
}
@media (max-width: 480px) {
  .section-title, .page-title { font-size: 20px; line-height: 1.3; }
  .merchant-footer { padding: 16px 12px; }
}
