/* 商户端样式 */
:root {
  --mp-primary: #002b5c;
  --mp-primary-dark: #001736;
  --mp-accent: #fea619;
  --mp-border: #e5e7eb;
  --mp-bg: #f3f4f6;
  --mp-sidebar-w: 260px;
}

*, *::before, *::after { box-sizing: border-box; }
body.mp-body { margin: 0; font-family: 'Noto Sans SC', sans-serif; background: var(--mp-bg); color: #191c1d; }
a { color: inherit; text-decoration: none; }

/* 登录页 */
.mp-login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #001736 0%, #002b5c 60%, #0a4d8c 100%); padding: 24px; }
.mp-login-wrap { width: 100%; max-width: 420px; }
.mp-login-card { background: #fff; border-radius: 12px; padding: 40px 36px; box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.mp-login-brand { text-align: center; margin-bottom: 32px; }
.mp-login-logo { width: 56px; height: 56px; margin: 0 auto 16px; background: var(--mp-primary); color: #fff; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 700; }
.mp-login-brand h1 { margin: 0 0 8px; font-size: 22px; color: var(--mp-primary-dark); }
.mp-login-brand p { margin: 0; font-size: 13px; color: #6b7280; }
.mp-login-form .mp-field { margin-bottom: 18px; }
.mp-login-form label { display: block; font-size: 14px; font-weight: 500; margin-bottom: 6px; color: #374151; }
.mp-login-form input { width: 100%; height: 44px; border: 1px solid var(--mp-border); border-radius: 8px; padding: 0 14px; font-size: 15px; outline: none; }
.mp-login-form input:focus { border-color: var(--mp-primary); box-shadow: 0 0 0 3px rgba(0,43,92,.1); }
.mp-login-tip { margin: 20px 0 0; font-size: 12px; color: #9ca3af; text-align: center; line-height: 1.6; }

/* 布局 */
.mp-layout { display: flex; min-height: 100vh; }
.mp-sidebar { width: var(--mp-sidebar-w); background: var(--mp-primary-dark); color: rgba(255,255,255,.85); display: flex; flex-direction: column; flex-shrink: 0; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.mp-main { flex: 1; min-width: 0; padding: 28px 32px 48px; }

.mp-brand { display: flex; align-items: center; gap: 12px; padding: 24px 20px; border-bottom: 1px solid rgba(255,255,255,.08); }
.mp-brand-icon { width: 40px; height: 40px; background: var(--mp-accent); color: #fff; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-weight: 700; flex-shrink: 0; }
.mp-brand-text strong { display: block; font-size: 15px; color: #fff; }
.mp-brand-text span { font-size: 11px; opacity: .65; }
.mp-user-card { padding: 16px 20px; border-bottom: 1px solid rgba(255,255,255,.08); }
.mp-user-name { margin: 0 0 4px; font-size: 14px; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mp-user-sub { margin: 0; font-size: 12px; opacity: .55; }

.mp-nav { flex: 1; padding: 12px 0; }
.mp-nav-item, .mp-nav-group-title { display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 20px; font-size: 14px; color: rgba(255,255,255,.75); border: none; background: none; cursor: pointer; text-align: left; }
.mp-nav-item:hover, .mp-nav-group-title:hover, .mp-nav-sub-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.mp-nav-item.active { background: rgba(254,166,25,.15); color: var(--mp-accent); border-right: 3px solid var(--mp-accent); }
.mp-nav-icon { width: 18px; text-align: center; opacity: .85; }
.mp-nav-sub { display: none; padding: 4px 0 8px; }
.mp-nav-group.open .mp-nav-sub { display: block; }
.mp-nav-sub-item { display: block; padding: 9px 20px 9px 48px; font-size: 13px; color: rgba(255,255,255,.6); }
.mp-nav-sub-item.active { color: var(--mp-accent); background: rgba(255,255,255,.04); }
.mp-sidebar-foot { padding: 16px 20px; border-top: 1px solid rgba(255,255,255,.08); }
.mp-logout { display: block; text-align: center; padding: 10px; border-radius: 8px; background: rgba(255,255,255,.08); font-size: 13px; color: rgba(255,255,255,.8); }
.mp-logout:hover { background: rgba(255,255,255,.14); color: #fff; }

/* 页面 */
.mp-page-header { margin-bottom: 24px; }
.mp-page-header h1 { margin: 0 0 6px; font-size: 24px; color: var(--mp-primary-dark); }
.mp-page-header p { margin: 0; font-size: 14px; color: #6b7280; }
.mp-page-header-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

.mp-btn-primary, .mp-btn-secondary { display: inline-flex; align-items: center; justify-content: center; height: 40px; padding: 0 20px; border-radius: 8px; font-size: 14px; font-weight: 600; border: none; cursor: pointer; }
.mp-btn-primary { background: var(--mp-primary); color: #fff; width: 100%; }
.mp-btn-primary:hover { background: var(--mp-primary-dark); }
.mp-btn-secondary { background: #fff; color: var(--mp-primary); border: 1px solid var(--mp-border); }
.mp-btn-secondary:disabled { opacity: .5; cursor: not-allowed; }

.mp-stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.mp-stat-card { background: #fff; border-radius: 10px; padding: 20px; border: 1px solid var(--mp-border); }
.mp-stat-label { font-size: 13px; color: #6b7280; }
.mp-stat-num { display: block; font-size: 28px; font-weight: 700; margin-top: 8px; color: var(--mp-primary-dark); }
.mp-stat-warn { color: #d97706; }
.mp-stat-ok { color: #059669; }
.mp-stat-sub { display: block; font-size: 12px; color: #9ca3af; margin-top: 4px; }

.mp-quick-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.mp-quick-card { background: #fff; border: 1px solid var(--mp-border); border-radius: 10px; padding: 20px; transition: box-shadow .2s; }
.mp-quick-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.08); }
.mp-quick-card strong { display: block; font-size: 16px; margin-bottom: 6px; color: var(--mp-primary-dark); }
.mp-quick-card span { font-size: 13px; color: #6b7280; }

.mp-form { background: #fff; border-radius: 10px; border: 1px solid var(--mp-border); padding: 28px; }
.mp-form-narrow { max-width: 520px; }
.mp-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 20px; }
.mp-field-full { grid-column: 1 / -1; }
.mp-field label { display: block; font-size: 14px; font-weight: 500; margin-bottom: 6px; }
.mp-field label em { color: #dc2626; font-style: normal; }
.mp-field input, .mp-field textarea { width: 100%; border: 1px solid var(--mp-border); border-radius: 8px; padding: 10px 12px; font-size: 14px; font-family: inherit; }
.mp-field textarea { resize: vertical; }
.mp-upload-row { display: flex; gap: 10px; }
.mp-upload-row input { flex: 1; }
.mp-preview-img { max-width: 200px; margin-top: 10px; border-radius: 8px; border: 1px solid var(--mp-border); }
.mp-preview-cover { display: block; max-width: 100%; width: 360px; margin-top: 10px; border-radius: 8px; border: 1px solid var(--mp-border); aspect-ratio: 16 / 9; object-fit: cover; }
.mp-field-hint { margin: 8px 0 0; font-size: 12px; color: #9ca3af; }
.mp-tags-editor { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-height: 44px; padding: 8px 10px; border: 1px solid var(--mp-border); border-radius: 8px; background: #fff; }
.mp-tags-editor:focus-within { border-color: var(--mp-primary); box-shadow: 0 0 0 3px rgba(0,43,92,.1); }
.mp-tags-list { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.mp-tag-chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 8px 4px 10px; border-radius: 999px; background: rgba(0,43,92,.08); color: var(--mp-primary); font-size: 13px; line-height: 1.4; }
.mp-tag-chip-text { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mp-tag-chip-remove { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; padding: 0; border: none; border-radius: 50%; background: transparent; color: #6b7280; font-size: 16px; line-height: 1; cursor: pointer; }
.mp-tag-chip-remove:hover { background: rgba(0,0,0,.08); color: #dc2626; }
.mp-tags-input { flex: 1; min-width: 140px; border: none; outline: none; padding: 4px 2px; font-size: 14px; font-family: inherit; background: transparent; }
.mp-area-picker .pf-area-input-wrap { max-width: 420px; }
.mp-area-display { cursor: pointer; background: #fff; }
/* 商户端省市弹框：紧凑下拉，不用全屏遮罩 */
.mp-area-picker .pf-area-mask { display: none !important; }
.mp-area-picker .pf-area-panel {
  left: 0;
  right: auto;
  width: 300px;
  max-width: 100%;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 43, 92, 0.12);
}
.mp-area-picker .pf-area-panel-head { padding: 8px 12px; }
.mp-area-picker .pf-area-panel-title { font-size: 13px; }
.mp-area-picker .pf-area-close { width: 24px; height: 24px; font-size: 18px; }
.mp-area-picker .pf-area-panel-body { min-height: 140px; max-height: 180px; }
.mp-area-picker .pf-area-list { padding: 4px 0; }
.mp-area-picker .pf-area-item { padding: 7px 12px; font-size: 13px; }
.mp-area-picker .pf-area-empty { padding: 16px 12px; font-size: 12px; }
.mp-area-picker .pf-area-panel-foot { padding: 8px 12px; }
.mp-area-picker .pf-area-btn-ok { flex: none; width: 100%; padding: 7px 12px; font-size: 13px; border-radius: 6px; }
@media (max-width: 768px) {
  .mp-area-picker .pf-area-panel {
    position: absolute;
    left: 0;
    right: auto;
    bottom: auto;
    top: calc(100% + 6px);
    width: min(300px, 100%);
    max-height: none;
    border-radius: 8px;
  }
  .mp-area-picker .pf-area-panel-body { max-height: 180px; }
}
.mp-form-actions { margin-top: 24px; }
.mp-form-actions .mp-btn-primary { width: auto; min-width: 140px; }

.mp-table-wrap { background: #fff; border-radius: 10px; border: 1px solid var(--mp-border); overflow: auto; }
.mp-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.mp-table th, .mp-table td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--mp-border); }
.mp-table th { background: #f9fafb; font-weight: 600; color: #374151; }
.mp-actions { white-space: nowrap; }
.mp-actions a, .mp-link-btn { margin-right: 12px; color: var(--mp-primary); background: none; border: none; cursor: pointer; font-size: 14px; padding: 0; }
.mp-link-btn.mp-danger { color: #dc2626; }
.mp-empty, .mp-empty-block { padding: 48px; text-align: center; color: #9ca3af; }

.mp-tag { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 500; }
.mp-tag-pending { background: #fef3c7; color: #92400e; }
.mp-tag-approved { background: #d1fae5; color: #065f46; }
.mp-tag-rejected { background: #fee2e2; color: #991b1b; }

.mp-record-list { display: flex; flex-direction: column; gap: 12px; }
.mp-record-item { display: flex; justify-content: space-between; align-items: center; background: #fff; border: 1px solid var(--mp-border); border-radius: 10px; padding: 18px 20px; }
.mp-record-main h3 { margin: 0 0 6px; font-size: 16px; }
.mp-record-main p { margin: 0; font-size: 13px; color: #6b7280; }
.mp-record-remark { color: #dc2626 !important; margin-top: 4px !important; }

.mp-placeholder-card { display: grid; grid-template-columns: 280px 1fr; gap: 20px; }
.mp-star-preview, .mp-placeholder-body, .mp-card { background: #fff; border: 1px solid var(--mp-border); border-radius: 10px; padding: 24px; }
.mp-stars { font-size: 28px; color: var(--mp-accent); margin: 12px 0; letter-spacing: 2px; }
.mp-placeholder-body ul { padding-left: 20px; color: #4b5563; line-height: 1.8; }

.mp-fee-countdown { background: linear-gradient(135deg, var(--mp-primary), #0a4d8c); color: #fff; border-radius: 12px; padding: 28px 32px; margin-bottom: 20px; text-align: center; }
.mp-countdown-num { font-size: 48px; font-weight: 700; margin: 0 8px; }
.mp-countdown-expired { font-size: 24px; }
.mp-fee-status { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.mp-fee-tag { display: inline-flex; align-items: center; padding: 6px 12px; border-radius: 999px; font-size: 13px; background: #f3f4f6; color: #6b7280; }
.mp-fee-tag.active { background: #ecfdf5; color: #047857; }
.mp-section-title { margin: 0 0 16px; font-size: 18px; }
.mp-fee-plans { margin-bottom: 20px; }
.mp-plan-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.mp-plan-card { background: #fff; border: 1px solid var(--mp-border); border-radius: 12px; padding: 24px; text-align: center; }
.mp-plan-card h3 { margin: 0 0 12px; font-size: 18px; }
.mp-plan-price { font-size: 36px; font-weight: 700; color: var(--mp-primary); margin-bottom: 8px; }
.mp-plan-currency { font-size: 18px; margin-right: 2px; }
.mp-plan-days { margin: 0 0 20px; color: #6b7280; font-size: 14px; }
.mp-fee-order-list { list-style: none; margin: 0; padding: 0; }
.mp-fee-order-list li { padding: 12px 0; border-bottom: 1px solid #f3f4f6; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.mp-fee-order-list li:last-child { border-bottom: 0; }
.mp-fee-join { margin-bottom: 16px; }
.mp-fee-join-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 12px; }
.mp-fee-join-item { display: flex; flex-direction: column; gap: 6px; padding: 16px; background: #f9fafb; border-radius: 8px; }
.mp-fee-join-label { font-size: 13px; color: #6b7280; }
.mp-fee-join-item strong { font-size: 16px; color: #111827; }
.mp-fee-records { margin-bottom: 20px; }
.mp-fee-records-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.mp-fee-records-head h3 { margin: 0; }
.mp-fee-table-wrap { overflow-x: auto; }
.mp-fee-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.mp-fee-table th, .mp-fee-table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid #f3f4f6; }
.mp-fee-table th { background: #f9fafb; color: #6b7280; font-weight: 500; white-space: nowrap; }
.mp-fee-table td { color: #374151; }
.mp-fee-table tbody tr:last-child td { border-bottom: 0; }
.mp-order-status { display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 500; }
.mp-order-status-pending { background: #fff7ed; color: #c2410c; }
.mp-order-status-paid { background: #ecfdf5; color: #047857; }
.mp-fee-table .mp-btn-primary { height: 32px; padding: 0 12px; font-size: 13px; }
.mp-user-expire { margin: 8px 0 0; font-size: 12px; color: #047857; }
.mp-user-expire.expired { color: #dc2626; }
.mp-fee-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.mp-muted { color: #6b7280; font-size: 13px; }
.mp-empty-inline { margin-top: 16px; padding: 24px; background: #f9fafb; border-radius: 8px; text-align: center; color: #9ca3af; font-size: 14px; }

.mp-search-form { display: flex; gap: 8px; }
.mp-search-form input { height: 40px; border: 1px solid var(--mp-border); border-radius: 8px; padding: 0 12px; min-width: 220px; }
.mp-purchase-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.mp-purchase-card { background: #fff; border: 1px solid var(--mp-border); border-radius: 10px; padding: 20px; }
.mp-purchase-card h3 { margin: 0 0 8px; font-size: 16px; }
.mp-purchase-card p { margin: 0 0 6px; font-size: 13px; color: #4b5563; }
.mp-purchase-budget { color: var(--mp-primary) !important; font-weight: 600; }
.mp-purchase-meta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 12px; font-size: 12px; color: #9ca3af; }

.mp-page-wide .mp-post-form-wrap { background: #fff; border-radius: 10px; border: 1px solid var(--mp-border); padding: 8px 16px 24px; }
.mp-pagination { margin-top: 20px; }

@media (max-width: 1024px) {
  .mp-stat-grid, .mp-quick-grid { grid-template-columns: repeat(2, 1fr); }
  .mp-placeholder-card, .mp-fee-grid, .mp-purchase-grid, .mp-plan-grid, .mp-fee-join-grid { grid-template-columns: 1fr; }
  .mp-form-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .mp-layout { flex-direction: column; }
  .mp-sidebar { width: 100%; height: auto; position: static; }
  .mp-main { padding: 16px; }
  .mp-stat-grid, .mp-quick-grid { grid-template-columns: 1fr; }
}
