/* ========================================
   SMM Panel - Frontend Styles
   ======================================== */

/* v-cloak 隐藏未编译模板 */
[v-cloak] {
    display: none !important;
}

/* ---- 容器 ---- */
.smp-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 15px 40px;
    font-size: 14px;
    color: #333;
}

/* ---- 页面头部 ---- */
.smp-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.smp-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
    color: #1a1a1a;
}

.smp-subtitle {
    width: 100%;
    margin: -8px 0 0;
    color: #888;
    font-size: 14px;
}

/* ---- 页面头部订单入口 ---- */
.smp-header-orders {
    margin-left: auto;
}

/* ---- 返回链接 ---- */
.smp-back-link {
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.smp-back-link a {
    color: #666;
    text-decoration: none;
    font-size: 14px;
    transition: color .2s;
}

.smp-back-link a:hover {
    color: #ff6b35;
}

.smp-orders-link {
    color: #ff6b35 !important;
    font-weight: 500;
}

/* ---- 分类标签栏 ---- */
.smp-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.smp-cat-tag {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 20px;
    background: #f5f5f5;
    color: #666;
    font-size: 13px;
    cursor: pointer;
    transition: all .2s;
    border: 1px solid transparent;
    user-select: none;
}

.smp-cat-tag:hover {
    background: #fff0e8;
    color: #ff6b35;
    border-color: #ffd5c0;
}

.smp-cat-tag.active {
    background: #ff6b35;
    color: #fff;
    border-color: #ff6b35;
}

/* ---- 二级分类标签栏 ---- */
.smp-sub-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
    padding: 10px 14px;
    background: #fafafa;
    border-radius: 8px;
    border: 1px solid #f0f0f0;
}

.smp-sub-tag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 14px;
    background: #fff;
    color: #888;
    font-size: 12px;
    cursor: pointer;
    transition: all .2s;
    border: 1px solid #e8e8e8;
    user-select: none;
}

.smp-sub-tag:hover {
    color: #ff6b35;
    border-color: #ffd5c0;
}

.smp-sub-tag.active {
    background: #fff0e8;
    color: #ff6b35;
    border-color: #ff6b35;
    font-weight: 500;
}

/* ---- 搜索栏 ---- */
.smp-search-bar {
    margin-bottom: 20px;
}

.smp-search-input {
    width: 100%;
    max-width: 400px;
    padding: 10px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: border-color .2s;
    box-sizing: border-box;
}

.smp-search-input:focus {
    border-color: #ff6b35;
}

/* ---- 商品网格 ---- */
.smp-goods-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

.smp-goods-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, .06);
    cursor: pointer;
    transition: transform .2s, box-shadow .2s;
    border: 1px solid #f0f0f0;
}

.smp-goods-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, .1);
    border-color: #ffd5c0;
}

.smp-goods-thumb {
    position: relative;
    width: 100% !important;
    padding-top: 100% !important;
    overflow: hidden;
    background: #f9f9f9;
}

.smp-goods-thumb img {
    position: absolute !important;
    top: 6% !important;
    left: 6% !important;
    width: 88% !important;
    height: 88% !important;
    object-fit: cover !important;
    display: block !important;
    max-width: none !important;
    max-height: none !important;
    border-radius: 14px !important;
}

/* 暂停购买 - 图片遮罩 */
.smp-goods-paused .smp-goods-thumb::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 1;
}

/* 暂停购买标签 */
.smp-paused-badge {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    padding: 6px 0;
    letter-spacing: 1px;
    z-index: 2;
}

/* 暂停购买的商品卡片 */
.smp-goods-paused {
    cursor: not-allowed;
}

.smp-goods-paused .smp-goods-info {
    opacity: 0.6;
}

.smp-goods-paused:hover {
    transform: none;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

/* 商品详情页暂停通知 */
.smp-paused-notice {
    background: #fff3e0;
    border: 1px solid #ffe0b2;
    color: #e65100;
    padding: 12px 18px;
    border-radius: 8px;
    font-size: 14px;
    text-align: center;
    margin-bottom: 20px;
}

.smp-goods-info {
    padding: 14px 16px 16px;
}

.smp-goods-name {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 6px;
    color: #1a1a1a;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.smp-goods-cat {
    display: inline-block;
    font-size: 12px;
    color: #999;
    background: #f5f5f5;
    padding: 2px 8px;
    border-radius: 4px;
    margin-bottom: 8px;
}

.smp-goods-price {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
}

.smp-goods-price em {
    font-style: normal;
    font-size: 18px;
    font-weight: 700;
    color: #ff6b35;
}

.smp-vip-tag {
    font-size: 11px;
    color: #b8860b;
    background: linear-gradient(135deg, #fff8e1, #ffecb3);
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 500;
}

/* ---- 商品详情页 ---- */
.smp-product-detail {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, .06);
    border: 1px solid #f0f0f0;
}

.smp-product-header {
    display: flex;
    gap: 24px;
    margin-bottom: 24px;
}

.smp-product-thumb {
    flex: 0 0 240px;
    border-radius: 8px;
    overflow: hidden;
    background: #f9f9f9;
}

.smp-product-thumb img {
    width: 100%;
    display: block;
    border-radius: 8px;
}

.smp-product-meta {
    flex: 1;
    min-width: 0;
}

.smp-product-meta h1 {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 8px;
    color: #1a1a1a;
    line-height: 1.4;
}

.smp-product-price-box {
    margin: 12px 0 16px;
}

.smp-price-main {
    font-size: 28px;
    font-weight: 700;
    color: #ff6b35;
}

.smp-price-main small {
    font-size: 14px;
    font-weight: 400;
    color: #999;
}

.smp-price-vip {
    margin-top: 4px;
    font-size: 13px;
    color: #b8860b;
}

.smp-vip-badge {
    display: inline-block;
    background: linear-gradient(135deg, #fff8e1, #ffecb3);
    padding: 2px 10px;
    border-radius: 4px;
    font-weight: 600;
    color: #b8860b;
}

.smp-product-info-items {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.smp-product-info-items span {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 6px;
    background: #f5f7fa;
    color: #666;
    font-size: 12px;
}

.smp-can-refund {
    color: #27ae60 !important;
    background: #e8f8ef !important;
}

/* ---- 商品描述 ---- */
.smp-product-desc {
    margin-bottom: 20px;
    padding-top: 16px;
    border-top: 1px solid #f0f0f0;
}

.smp-product-desc h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 8px;
    color: #1a1a1a;
}

.smp-product-desc p {
    color: #555;
    line-height: 1.7;
    margin: 0;
    white-space: pre-wrap;
}

/* ---- 下单表单 ---- */
.smp-order-form {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}

.smp-order-form h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 16px;
    color: #1a1a1a;
}

.smp-form-group {
    margin-bottom: 16px;
}

.smp-form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-bottom: 6px;
}

.smp-required {
    color: #e74c3c;
    margin-left: 2px;
}

.smp-input-error {
    border-color: #e74c3c !important;
}

.smp-field-error {
    font-size: 12px;
    color: #e74c3c;
    margin: 4px 0 0;
}

.smp-param-desc {
    font-size: 12px;
    color: #999;
    margin: 0 0 6px;
}

.smp-input {
    width: 100%;
    max-width: 500px;
    padding: 10px 14px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: border-color .2s;
    box-sizing: border-box;
    font-family: inherit;
}

.smp-input:focus {
    border-color: #ff6b35;
}

textarea.smp-input {
    resize: vertical;
    min-height: 60px;
}

.smp-input-num {
    max-width: 180px;
}

/* ---- 订单汇总 ---- */
.smp-order-summary {
    background: #fafafa;
    border-radius: 8px;
    padding: 16px 20px;
    margin: 20px 0;
    max-width: 500px;
}

.smp-order-summary p {
    margin: 4px 0;
    color: #555;
    font-size: 14px;
}

.smp-order-total {
    font-size: 16px !important;
    color: #1a1a1a !important;
    margin-top: 8px !important;
    padding-top: 8px;
    border-top: 1px dashed #e0e0e0;
}

.smp-order-total strong {
    color: #ff6b35;
    font-size: 20px;
}

/* ---- 支付方式 ---- */
.smp-pay-methods {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.smp-pay-option {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all .2s;
    font-size: 14px;
    color: #555;
    user-select: none;
}

.smp-pay-option:hover {
    border-color: #ffd5c0;
}

.smp-pay-option.active {
    border-color: #ff6b35;
    background: #fff8f4;
    color: #ff6b35;
}

.smp-pay-option input[type="radio"] {
    accent-color: #ff6b35;
}

/* ---- 按钮 ---- */
.smp-btn-submit {
    display: inline-block;
    padding: 12px 48px;
    background: linear-gradient(135deg, #ff6b35, #ff8f5e);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity .2s, transform .1s;
}

.smp-btn-submit:hover {
    opacity: .9;
}

.smp-btn-submit:active {
    transform: scale(.98);
}

.smp-btn-submit:disabled {
    opacity: .6;
    cursor: not-allowed;
}

.smp-btn-outline {
    display: inline-block;
    padding: 8px 20px;
    border: 1px solid #ff6b35;
    border-radius: 8px;
    color: #ff6b35;
    font-size: 14px;
    text-decoration: none;
    transition: all .2s;
}

.smp-btn-outline:hover {
    background: #ff6b35;
    color: #fff;
    text-decoration: none;
}

.smp-btn-sm {
    display: inline-block;
    padding: 6px 14px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background: #fff;
    color: #555;
    font-size: 13px;
    cursor: pointer;
    transition: all .2s;
}

.smp-btn-sm:hover {
    border-color: #ff6b35;
    color: #ff6b35;
}

.smp-btn-sm:disabled {
    opacity: .5;
    cursor: not-allowed;
}

.smp-btn-danger {
    border-color: #f0d0d0;
    color: #e74c3c;
}

.smp-btn-danger:hover {
    border-color: #e74c3c;
    color: #e74c3c;
    background: #fdf2f2;
}

.smp-btn-copy {
    display: inline-block;
    padding: 2px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fafafa;
    color: #666;
    font-size: 12px;
    cursor: pointer;
    margin-left: 6px;
    transition: all .2s;
}

.smp-btn-copy:hover {
    border-color: #ff6b35;
    color: #ff6b35;
}

/* ---- 订单标签栏 ---- */
.smp-order-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 0;
}

.smp-tab {
    display: inline-block;
    padding: 10px 18px;
    font-size: 14px;
    color: #666;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all .2s;
    user-select: none;
    margin-bottom: -1px;
}

.smp-tab:hover {
    color: #ff6b35;
}

.smp-tab.active {
    color: #ff6b35;
    border-bottom-color: #ff6b35;
    font-weight: 600;
}

/* ---- 订单列表 ---- */
.smp-order-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.smp-order-card {
    background: #fff;
    border-radius: 10px;
    border: 1px solid #f0f0f0;
    overflow: hidden;
    transition: box-shadow .2s;
}

.smp-order-card:hover {
    box-shadow: 0 2px 12px rgba(0, 0, 0, .06);
}

.smp-order-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #fafafa;
    border-bottom: 1px solid #f0f0f0;
}

.smp-order-no {
    font-size: 13px;
    color: #888;
    font-family: 'Courier New', Courier, monospace;
}

.smp-order-status {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

/* 订单状态颜色 */
.smp-order-status.status--1 {
    background: #fff3e0;
    color: #e65100;
}

.smp-order-status.status-1,
.smp-order-status.status-8 {
    background: #e3f2fd;
    color: #1565c0;
}

.smp-order-status.status-2 {
    background: #e8f5e9;
    color: #2e7d32;
}

.smp-order-status.status-3,
.smp-order-status.status-4,
.smp-order-status.status-6 {
    background: #ffebee;
    color: #c62828;
}

.smp-order-status.status-5 {
    background: #fce4ec;
    color: #ad1457;
}

.smp-order-status.status-7 {
    background: #e0f2f1;
    color: #00695c;
}

.smp-order-status.status-9 {
    background: #f3e5f5;
    color: #6a1b9a;
}

.smp-order-status.status-10 {
    background: #efebe9;
    color: #4e342e;
}

.smp-order-body {
    padding: 16px;
}

.smp-order-goods {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.smp-order-thumb {
    width: 64px;
    height: 64px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
    background: #f5f5f5;
    max-width: none;
    max-height: none;
}

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

.smp-order-goods-info h4 {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 4px;
    color: #1a1a1a;
    line-height: 1.4;
}

.smp-order-goods-info p {
    font-size: 13px;
    color: #888;
    margin: 2px 0;
    line-height: 1.5;
}

.smp-order-progress {
    color: #2e7d32 !important;
}

.smp-card-info code {
    background: #f5f5f5;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    word-break: break-all;
}

.smp-order-params {
    font-size: 12px !important;
    color: #666;
    word-break: break-all;
}

.smp-param-item {
    display: block;
    margin-bottom: 2px;
}

.smp-order-error {
    color: #e74c3c !important;
    font-size: 12px !important;
}

.smp-order-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    border-top: 1px solid #f0f0f0;
    background: #fafafa;
}

.smp-order-time {
    font-size: 12px;
    color: #aaa;
}

.smp-order-actions {
    display: flex;
    gap: 8px;
}

/* ---- 分页 ---- */
.smp-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 24px;
    font-size: 14px;
    color: #666;
}

/* ---- 状态提示 ---- */
.smp-loading {
    text-align: center;
    padding: 40px 0;
    color: #999;
}

.smp-empty {
    text-align: center;
    padding: 60px 0;
    color: #bbb;
}

.smp-empty p,
.smp-loading p {
    margin: 0;
    font-size: 15px;
}

.smp-error {
    background: #fff2f0;
    border: 1px solid #ffa39e;
    border-radius: 8px;
    padding: 12px 16px;
    margin-top: 16px;
}

.smp-error p {
    margin: 0;
    color: #cf1322;
    font-size: 14px;
}

.smp-success {
    background: #f6ffed;
    border: 1px solid #b7eb8f;
    border-radius: 8px;
    padding: 12px 16px;
    margin-top: 16px;
}

.smp-success p {
    margin: 0;
    color: #389e0d;
    font-size: 14px;
}

.smp-login-tip {
    text-align: center;
    padding: 60px 0;
    color: #888;
    font-size: 15px;
}

.smp-login-tip a {
    color: #ff6b35;
    font-weight: 600;
    text-decoration: none;
}

.smp-login-tip a:hover {
    text-decoration: underline;
}

/* ========================================
   商品详情页 - 两栏布局
   ======================================== */

.smp-product-layout {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    margin-bottom: 24px;
}

.smp-product-left {
    flex: 0 0 38%;
    max-width: 38%;
}

.smp-product-right {
    flex: 1;
    min-width: 0;
    position: sticky;
    top: 80px;
}

.smp-product-card {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, .06);
    border: 1px solid #f0f0f0;
}

.smp-product-thumb-lg {
    position: relative;
    width: 100%;
    padding-top: 100%;
    border-radius: 8px;
    overflow: hidden;
    background: #f9f9f9;
    margin-bottom: 16px;
}

.smp-product-thumb-lg img {
    position: absolute !important;
    top: 6% !important;
    left: 6% !important;
    width: 88% !important;
    height: 88% !important;
    object-fit: cover !important;
    display: block !important;
    max-width: none !important;
    max-height: none !important;
}

.smp-product-name {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 8px;
    color: #1a1a1a;
    line-height: 1.4;
}

.smp-product-brief {
    color: #666;
    font-size: 13px;
    line-height: 1.6;
    margin: 8px 0 12px;
    white-space: pre-wrap;
}

.smp-product-sn {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 13px;
}

.smp-info-label {
    color: #999;
}

.smp-info-value {
    color: #333;
    font-family: 'Courier New', monospace;
}

/* 右栏下单表单卡片 */
.smp-order-card-form {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, .06);
    border: 1px solid #f0f0f0;
}

.smp-order-card-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 20px;
    color: #1a1a1a;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f0f0;
}

/* 数量 +/- 控件 */
.smp-qty-wrapper {
    display: flex;
    align-items: center;
    max-width: 200px;
}

.smp-qty-btn {
    width: 36px;
    height: 36px;
    border: 1px solid #e0e0e0;
    background: #fafafa;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .2s;
    color: #333;
    user-select: none;
    line-height: 1;
}

.smp-qty-btn:first-child {
    border-radius: 8px 0 0 8px;
    border-right: none;
}

.smp-qty-btn:last-child {
    border-radius: 0 8px 8px 0;
    border-left: none;
}

.smp-qty-btn:hover {
    background: #ff6b35;
    border-color: #ff6b35;
    color: #fff;
}

.smp-input-qty {
    max-width: 100px;
    border-radius: 0;
    text-align: center;
    -moz-appearance: textfield;
}

.smp-input-qty::-webkit-inner-spin-button,
.smp-input-qty::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.smp-qty-hint {
    font-size: 12px;
    color: #999;
    margin: 4px 0 0;
}

/* 合计金额条 */
.smp-order-total-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fafafa;
    border-radius: 8px;
    padding: 14px 18px;
    margin: 16px 0;
}

.smp-order-total-bar span {
    font-size: 14px;
    color: #666;
}

.smp-order-total-bar strong {
    font-size: 24px;
    color: #ff6b35;
    font-weight: 700;
}

/* 全宽提交按钮 */
.smp-btn-full {
    width: 100%;
    text-align: center;
}

/* 未登录提示卡片 */
.smp-login-tip-card {
    background: #fff;
    border-radius: 12px;
    padding: 60px 24px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, .06);
    border: 1px solid #f0f0f0;
    text-align: center;
    color: #888;
    font-size: 15px;
}

.smp-login-tip-card a {
    color: #ff6b35;
    font-weight: 600;
    text-decoration: none;
}

/* 全宽区块标题 */
.smp-section-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 16px;
    color: #1a1a1a;
    padding-bottom: 12px;
    border-bottom: 2px solid #ff6b35;
    display: inline-block;
}

/* 商品详情区块 */
.smp-detail-section {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, .06);
    border: 1px solid #f0f0f0;
    margin-bottom: 24px;
}

.smp-detail-content {
    color: #555;
    line-height: 1.8;
    font-size: 14px;
}

.smp-detail-content img {
    max-width: 100%;
    height: auto;
}

/* 历史订单区块 */
.smp-history-section {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, .06);
    border: 1px solid #f0f0f0;
    margin-bottom: 24px;
}

.smp-history-filters {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.smp-filter-tag {
    display: inline-block;
    padding: 5px 14px;
    border-radius: 16px;
    background: #f5f5f5;
    color: #666;
    font-size: 13px;
    cursor: pointer;
    transition: all .2s;
    user-select: none;
}

.smp-filter-tag:hover {
    background: #fff0e8;
    color: #ff6b35;
}

.smp-filter-tag.active {
    background: #ff6b35;
    color: #fff;
}

.smp-history-table-wrap {
    overflow-x: auto;
}

.smp-history-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.smp-history-table th {
    background: #fafafa;
    padding: 10px 12px;
    text-align: left;
    font-weight: 600;
    color: #666;
    border-bottom: 1px solid #f0f0f0;
    white-space: nowrap;
}

.smp-history-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #f5f5f5;
    color: #333;
}

.smp-history-table tbody tr:hover {
    background: #fafafa;
}

.smp-col-no {
    font-family: 'Courier New', monospace;
    font-size: 12px;
    color: #888;
}

.smp-col-time {
    font-size: 12px;
    color: #aaa;
    white-space: nowrap;
}

.smp-order-status {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 12px;
}

.smp-order-status.status-7 { background: #e8f5e9; color: #2e7d32; }
.smp-order-status.status-2 { background: #fff3e0; color: #e65100; }
.smp-order-status.status-1,
.smp-order-status.status-8 { background: #e3f2fd; color: #1565c0; }
.smp-order-status.status-4 { background: #fce4ec; color: #c62828; }
.smp-order-status.status-3,
.smp-order-status.status-10 { background: #f3e5f5; color: #6a1b9a; }
.smp-order-status.status-5 { background: #fff8e1; color: #f57f17; }
.smp-order-status.status--1 { background: #f0f0f0; color: #888; }

/* ========================================
   批量下单 - 标签页 & 表单
   ======================================== */

/* 下单模式标签页 */
.smp-order-mode-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.smp-order-mode-tab {
    padding: 10px 20px;
    font-size: 14px;
    color: #888;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all .2s;
    user-select: none;
    font-weight: 500;
}

.smp-order-mode-tab:hover {
    color: #ff6b35;
}

.smp-order-mode-tab.active {
    color: #ff6b35;
    border-bottom-color: #ff6b35;
    font-weight: 600;
}

/* 数量模式选择 */
.smp-batch-qty-mode {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.smp-batch-mode-tag {
    display: inline-block;
    padding: 5px 14px;
    border-radius: 16px;
    background: #f5f5f5;
    color: #666;
    font-size: 13px;
    cursor: pointer;
    transition: all .2s;
    user-select: none;
    border: 1px solid transparent;
}

.smp-batch-mode-tag:hover {
    background: #fff0e8;
    color: #ff6b35;
}

.smp-batch-mode-tag.active {
    background: #ff6b35;
    color: #fff;
    border-color: #ff6b35;
}

/* 相同/随机数量输入区 */
.smp-batch-qty-config {
    margin-bottom: 16px;
    padding: 12px 16px;
    background: #fafafa;
    border-radius: 8px;
}

.smp-batch-qty-config label {
    font-size: 13px;
    color: #666;
    margin-right: 8px;
}

.smp-batch-random-range {
    display: flex;
    align-items: center;
    gap: 8px;
}

.smp-batch-random-range input {
    width: 100px;
}

.smp-batch-random-range span {
    color: #999;
    font-size: 13px;
}

/* 多行输入区 */
.smp-batch-rows {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 12px;
    background: #fff;
}

.smp-batch-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-bottom: 1px solid #f5f5f5;
}

.smp-batch-row:last-child {
    border-bottom: none;
}

.smp-batch-row-num {
    flex: 0 0 30px;
    text-align: center;
    font-size: 12px;
    color: #bbb;
    user-select: none;
}

.smp-batch-row .smp-input {
    flex: 1;
    max-width: none;
    padding: 8px 10px;
    font-size: 13px;
    border-radius: 6px;
}

.smp-batch-row-qty {
    flex: 0 0 auto;
    flex-shrink: 0;
}

/* 行内紧凑 +/- 数量控件 */
.smp-qty-mini {
    max-width: none;
    flex-shrink: 0;
}

.smp-qty-mini .smp-qty-btn {
    width: 28px;
    height: 30px;
    font-size: 14px;
    flex-shrink: 0;
}

.smp-qty-mini input[type="number"] {
    width: 50px;
    min-width: 50px;
    height: 30px;
    padding: 0 2px;
    border: 1px solid #e0e0e0;
    border-left: none;
    border-right: none;
    border-radius: 0;
    font-size: 13px;
    text-align: center;
    outline: none;
    box-sizing: border-box;
    -moz-appearance: textfield;
    flex-shrink: 0;
}

.smp-qty-mini input[type="number"]::-webkit-inner-spin-button,
.smp-qty-mini input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.smp-qty-mini input[type="number"]:focus {
    border-color: #ff6b35;
}

.smp-batch-row-del {
    flex: 0 0 24px;
    width: 24px;
    height: 24px;
    border: none;
    background: transparent;
    color: #ccc;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all .2s;
    padding: 0;
}

.smp-batch-row-del:hover {
    background: #fce4ec;
    color: #e74c3c;
}

/* 操作栏 */
.smp-batch-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.smp-batch-count {
    font-size: 13px;
    color: #999;
    margin-right: auto;
}

.smp-batch-controls .smp-btn-sm {
    font-size: 12px;
    padding: 4px 12px;
}

/* 批量导入弹窗 */
.smp-import-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.smp-import-modal {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.smp-import-modal h4 {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 12px;
    color: #1a1a1a;
}

.smp-import-modal textarea {
    width: 100%;
    height: 200px;
    padding: 12px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 13px;
    font-family: inherit;
    resize: vertical;
    outline: none;
    box-sizing: border-box;
    transition: border-color .2s;
}

.smp-import-modal textarea:focus {
    border-color: #ff6b35;
}

.smp-import-modal p.smp-import-hint {
    font-size: 12px;
    color: #999;
    margin: 6px 0 12px;
}

.smp-import-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* 批量提交结果 */
.smp-batch-results {
    margin-top: 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    max-height: 200px;
    overflow-y: auto;
}

.smp-batch-result-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    font-size: 13px;
    border-bottom: 1px solid #f5f5f5;
}

.smp-batch-result-row:last-child {
    border-bottom: none;
}

.smp-batch-result-row .smp-result-ok {
    color: #2e7d32;
}

.smp-batch-result-row .smp-result-fail {
    color: #c62828;
}

/* ---- 响应式 ---- */
@media (max-width: 768px) {
    .smp-container {
        padding: 12px 12px 30px;
    }

    .smp-title {
        font-size: 20px;
    }

    .smp-goods-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 10px;
    }

    .smp-goods-info {
        padding: 10px 12px 12px;
    }

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

    .smp-goods-price em {
        font-size: 16px;
    }

    .smp-product-header {
        flex-direction: column;
    }

    .smp-product-thumb {
        flex: none;
        max-width: 100%;
    }

    .smp-product-detail {
        padding: 16px;
        border-radius: 8px;
    }

    .smp-product-layout {
        flex-direction: column;
        gap: 16px;
    }

    .smp-product-left {
        flex: none;
        max-width: 100%;
    }

    .smp-product-right {
        position: static;
    }

    .smp-product-card,
    .smp-order-card-form,
    .smp-detail-section,
    .smp-history-section {
        padding: 16px;
        border-radius: 8px;
    }

    .smp-product-name {
        font-size: 16px;
    }

    .smp-order-total-bar strong {
        font-size: 20px;
    }

    .smp-history-table {
        min-width: 600px;
    }

    .smp-price-main {
        font-size: 24px;
    }

    .smp-input,
    .smp-order-summary {
        max-width: 100%;
    }

    .smp-pay-methods {
        flex-direction: column;
    }

    .smp-pay-option {
        width: 100%;
        box-sizing: border-box;
    }

    .smp-btn-submit {
        width: 100%;
        text-align: center;
    }

    .smp-order-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
    }

    .smp-tab {
        white-space: nowrap;
        padding: 8px 14px;
        font-size: 13px;
    }

    .smp-order-header {
        flex-wrap: wrap;
        gap: 6px;
    }

    .smp-order-goods {
        flex-direction: column;
    }

    .smp-order-thumb {
        width: 48px;
        height: 48px;
    }

    .smp-order-footer {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }

    .smp-order-actions {
        width: 100%;
    }

    .smp-order-actions .smp-btn-sm {
        flex: 1;
        text-align: center;
    }

    .smp-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .smp-pagination {
        gap: 10px;
    }

    .smp-search-input {
        max-width: 100%;
    }

    .smp-sub-categories {
        padding: 8px 10px;
        gap: 4px;
    }

    .smp-sub-tag {
        padding: 3px 10px;
        font-size: 11px;
    }

    .smp-batch-qty-mode {
        flex-wrap: wrap;
    }

    .smp-batch-random-range {
        flex-wrap: wrap;
    }

    .smp-batch-random-range input {
        width: 80px;
    }

    .smp-batch-row-qty {
        flex: 0 0 70px;
    }

    .smp-import-modal {
        width: 95%;
        padding: 16px;
    }
}
