* ========== 全局样式 ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Microsoft YaHei", sans-serif;
}

:root {
      --main: #ff6600;
    --main-dark: #ff5500;
    --sub: #333333;
    --ok: #00B42A;
    --bg: #F7F8FA;
    --white: #fff;
    --gray: #666;
    --light-gray: #999;
    --red: #f53f3f;
    --orange: #ff6600;
    --yellow: #ffc107;
}

body {
    background: var(--bg);
    color: var(--sub);
    line-height: 1.5;
}

a {
    text-decoration: none;
    color: inherit;
}

/* 与首页一致的容器宽度 */
.container {
    width: 1200px;
    margin: 0 auto;
}
.main-container {
    width: 1200px;
    margin: 20px auto;
    padding: 0;
}

/* 导航栏 - 与首页一致 */
.nav {
    background: var(--white);
    height: 70px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 99;
}
.nav .container {
    display: flex;
    align-items: center;
    height: 100%;
    justify-content: space-between;
}
.logo {
    font-size: 24px;
    font-weight: bold;
    color: var(--main);
    cursor: pointer;
}
.nav-menu {
    display: flex;
    gap: 30px;
}
.nav-menu a {
    color: var(--sub);
    text-decoration: none;
    font-size: 15px;
}
.nav-menu a:hover {
    color: var(--main);
}
.nav-menu a.active {
    color: var(--main);
    font-weight: 600;
}
.nav-right {
    display: flex;
    align-items: center;
    gap: 15px;
}
.nav-user-name {
    color: var(--orange);
    font-weight: bold;
    font-size: 14px;
}
.nav-logout {
    background: none;
    border: 1px solid #ddd;
    padding: 4px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    color: var(--gray);
}
.nav-logout:hover {
    border-color: var(--orange);
    color: var(--orange);
}
.nav-auth {
    display: flex;
    gap: 10px;
}
.nav-auth a {
    color: var(--main);
    font-size: 14px;
}

/* 醒目广告条 */
.hero-ad {
    background: linear-gradient(135deg, #E8F4FF 0%, #fff3e0 100%);
    border-radius: 12px;
    padding: 20px 30px;
    margin-bottom: 20px;
    border: 1px solid rgba(22,93,255,0.12);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
}
.hero-left .main-slogan {
    font-size: 22px;
    font-weight: bold;
    color: var(--main);
}
.hero-left .sub-slogan {
    font-size: 14px;
    color: var(--gray);
    margin-top: 4px;
}
.hero-right {
    display: flex;
    align-items: center;
    gap: 20px;
}
.hero-phone {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: var(--sub);
}
.hero-phone .phone-icon {
    font-size: 18px;
}
.hero-phone a {
    color: var(--orange);
    font-weight: bold;
    font-size: 16px;
    text-decoration: none;
}
.hero-phone .phone-note {
    font-size: 11px;
    color: var(--light-gray);
    margin-left: 4px;
}

/* 两列布局 */
.two-column {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}
@media (max-width: 1024px) {
    .two-column {
        flex-direction: column;
    }
}

/* 左栏 - 库存清单 */
.inventory-section {
    flex: 2;
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    padding: 20px;
}
.section-title {
    font-size: 18px;
    font-weight: bold;
    color: var(--sub);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--main);
    display: flex;
    align-items: center;
    gap: 8px;
}
.section-title .icon {
    font-size: 20px;
}

/* 搜索框 */
.search-box {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}
.search-box input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: all 0.2s;
}
.search-box input:focus {
    border-color: var(--main);
    box-shadow: 0 0 0 2px rgba(22,93,255,0.1);
}
.search-box button {
    padding: 10px 24px;
    background: var(--main);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}
.search-box button:hover {
    background: #0e4eda;
    transform: translateY(-1px);
}

/* 库存表格 */
.table-wrapper {
    max-height: 520px;
    overflow-y: auto;
    border: 1px solid #f0f0f0;
    border-radius: 8px;
}


/* 发布者头像单元格 */
.seller-avatar-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    margin: 0 auto;
}

.seller-avatar-img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #eee;
}

.seller-avatar-placeholder {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #e8f0ff;
    color: var(--main);
    font-weight: bold;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #d0e0ff;
}


.inventory-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.inventory-table th {
    position: sticky;
    top: 0;
    background: #fafbfc;
    padding: 12px 10px;
    text-align: center;
    font-weight: 600;
    color: var(--gray);
    border-bottom: 2px solid #e8e8e8;
    white-space: nowrap;
}
.inventory-table td {
    padding: 12px 10px;
    text-align: center;
    border-bottom: 1px solid #f5f5f5;
    transition: background 0.15s;
}
.inventory-table tbody tr {
    cursor: pointer;
    transition: background 0.15s;
}
.inventory-table tbody tr:hover {
    background: #fafbfc;
}
.inventory-table tbody tr.active {
    background: #e8f0ff;
}
.inventory-table tbody tr.active:hover {
    background: #dbeaff;
}

.highest-price {
    color: var(--red);
    font-weight: bold;
}
.no-price {
    color: var(--light-gray);
}

/* 状态标签 */
.status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}
.status-open {
    background: #e8f0ff;
    color: var(--main);
}
.status-sold {
    background: #e8f5e9;
    color: var(--ok);
}
.status-ended {
    background: #fff3e0;
    color: var(--orange);
}
.status-offline {
    background: #f5f5f5;
    color: var(--light-gray);
}

/* 分页 */
.pagination {
    margin-top: 15px;
    display: flex;
    gap: 5px;
    justify-content: center;
    flex-wrap: wrap;
}
.pagination a, .pagination span {
    padding: 6px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    text-decoration: none;
    color: var(--gray);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}
.pagination a:hover {
    border-color: var(--main);
    color: var(--main);
}
.pagination span.current {
    background: var(--main);
    color: white;
    border-color: var(--main);
}
.pagination span.disabled {
    color: #ccc;
    cursor: not-allowed;
    background: #f5f5f5;
}

/* 右栏 - 出价面板 */
.bid-section {
    flex: 1;
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    padding: 20px;
    position: sticky;
    top: 90px;
    max-height: calc(100vh - 110px);
    overflow-y: auto;
}

/* ========== 返回按钮样式 - 仅手机端显示 ========== */
.back-to-position-btn {
    display: none;
    width: 100%;
    background: #ff6600;
    color: #fff;
    border: none;
    padding: 12px 0;
    border-radius: 30px;
    margin-top: 15px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}
.back-to-position-btn:hover {
    background: #ff5500;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(255,102,0,0.2);
}
@media (max-width: 768px) {
    .back-to-position-btn {
        display: block !important;
    }
}

/* 商品信息卡片 */
.product-card {
    background: linear-gradient(135deg, #fafbfc, #e8f0ff);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    border-left: 4px solid var(--main);
}
.product-name {
    font-size: 18px;
    font-weight: bold;
    color: var(--sub);
    margin-bottom: 8px;
}
.product-meta {
    font-size: 13px;
    color: var(--gray);
    margin-bottom: 6px;
}
.product-meta span {
    margin-right: 12px;
}
.product-stock {
    font-size: 15px;
    color: #ff6600;
    font-weight: bold;
    margin: 8px 0;
}
.product-deadline {
    font-size: 12px;
    color: var(--light-gray);
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed #e0e0e0;
}
.highest-info {
    background: #fff3e0;
    border-radius: 8px;
    padding: 10px 12px;
    margin: 10px 0;
    font-size: 13px;
}
.highest-info .label {
    color: var(--gray);
    margin-bottom: 3px;
}
.highest-info .value {
    color: var(--red);
    font-size: 18px;
    font-weight: bold;
}
.threshold-info {
    font-size: 12px;
    color: var(--light-gray);
    margin-top: 4px;
}

/* 补偿金提示 */
.compensation-tip {
    background: linear-gradient(135deg, #fff3e0, #ffe0b2);
    border-radius: 12px;
    padding: 14px;
    margin: 12px 0;
    border: 1px solid #ffcc80;
}
.compensation-tip .tip-title {
    font-size: 14px;
    font-weight: bold;
    color: var(--orange);
    margin-bottom: 6px;
}
.compensation-tip .tip-text {
    font-size: 12px;
    color: #e65100;
    line-height: 1.6;
}

/* 登录提示 */
.login-prompt {
    text-align: center;
    padding: 40px 20px;
    background: var(--bg);
    border-radius: 12px;
    margin: 10px 0;
}
.login-prompt .icon {
    font-size: 40px;
    margin-bottom: 10px;
}
.login-prompt p {
    color: var(--gray);
    margin-bottom: 12px;
    font-size: 14px;
}
.login-prompt a {
    display: inline-block;
    padding: 10px 30px;
    background: var(--main);
    color: white;
    border-radius: 8px;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.2s;
}
.login-prompt a:hover {
    background: #0e4eda;
    transform: translateY(-1px);
}

/* 出价表单 */
.bid-form {
    background: var(--bg);
    padding: 16px;
    border-radius: 12px;
    margin: 12px 0;
    border: 1px solid #e8e8e8;
}
.bid-form-title {
    font-size: 15px;
    font-weight: bold;
    margin-bottom: 12px;
    color: var(--sub);
}
.form-group {
    margin-bottom: 12px;
}
.form-group label {
    display: block;
    font-size: 12px;
    color: var(--gray);
    margin-bottom: 5px;
}
.form-group input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: all 0.2s;
}
.form-group input:focus {
    border-color: var(--main);
    box-shadow: 0 0 0 2px rgba(22,93,255,0.1);
}
.form-group .hint {
    font-size: 11px;
    color: var(--light-gray);
    margin-top: 3px;
}
.stock-hint {
    background: #e8f0ff;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 12px;
    color: var(--main);
    margin-bottom: 12px;
}
.btn-primary {
    width: 100%;
    padding: 12px;
    background: var(--ok);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    font-weight: bold;
    transition: all 0.2s;
}
.btn-primary:hover {
    background: #009c24;
    transform: translateY(-1px);
}
.btn-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}
.btn-outline {
    display: block;
    width: 100%;
    padding: 9px;
    background: white;
    color: var(--gray);
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 8px;
    font-size: 13px;
    text-align: center;
    text-decoration: none;
    transition: all 0.2s;
}
.btn-outline:hover {
    border-color: var(--main);
    color: var(--main);
}

/* 出价记录列表 */
.bid-list-section {
    margin-top: 16px;
}
.bid-list-title {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 10px;
    color: var(--sub);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.bid-list-container {
    max-height: 280px;
    overflow-y: auto;
    border: 1px solid #f0f0f0;
    border-radius: 8px;
}
.bid-item {
    padding: 12px;
    border-bottom: 1px solid #f5f5f5;
    transition: background 0.15s;
}
.bid-item:last-child {
    border-bottom: none;
}
.bid-item:hover {
    background: #fafbfc;
}

.bid-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}
.bid-user {
    font-size: 13px;
    font-weight: 600;
    color: var(--sub);
}
.bid-user.you {
    color: var(--main);
}
.bid-status {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
}
.bid-status-highest {
    background: var(--red);
    color: white;
}
.bid-status-normal {
    background: #f0f0f0;
    color: var(--gray);
}
.bid-status-sold {
    background: #e8f5e9;
    color: var(--ok);
}
.bid-status-ended {
    background: #fff3e0;
    color: var(--orange);
}
.bid-detail {
    font-size: 12px;
    color: var(--gray);
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}
.bid-price {
    font-size: 16px;
    font-weight: bold;
    color: var(--red);
}
.bid-price.masked {
    color: #c0c0c0 !important;
    letter-spacing: 1px;
}
.bid-comp {
    font-size: 11px;
    color: var(--orange);
    margin-left: 4px;
}
.bid-time {
    font-size: 11px;
    color: #bbb;
}
.empty-bids {
    text-align: center;
    padding: 30px;
    color: #bbb;
    font-size: 13px;
}

/* 卖家查看出价 */
.owner-panel {
    background: var(--bg);
    border-radius: 12px;
    padding: 16px;
    margin: 12px 0;
}
.owner-panel-title {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 12px;
    color: var(--sub);
}
.bid-manage-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #e8e8e8;
}
.bid-manage-item:last-child {
    border-bottom: none;
}
.bid-manage-info .bid-manage-price {
    font-size: 15px;
    font-weight: bold;
    color: var(--red);
}
.bid-manage-info .bid-manage-meta {
    font-size: 12px;
    color: var(--gray);
    margin-top: 2px;
}
.agree-btn {
    padding: 5px 14px;
    background: var(--ok);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s;
}
.agree-btn:hover {
    background: #009c24;
}
.agree-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}
.owner-empty {
    text-align: center;
    padding: 20px;
    color: #bbb;
    font-size: 13px;
}

/* 商品结束后的提示 */
.goods-ended-panel {
    background: linear-gradient(135deg, #fff8e1, #fff3e0);
    border-radius: 12px;
    padding: 16px;
    margin: 12px 0;
    border: 1px solid #ffcc80;
    text-align: center;
}
.goods-ended-panel .ended-title {
    font-size: 15px;
    font-weight: bold;
    color: var(--orange);
    margin-bottom: 8px;
}
.goods-ended-panel .ended-text {
    font-size: 13px;
    color: #e65100;
    margin-bottom: 10px;
}
.goods-ended-panel .ended-link {
    display: inline-block;
    padding: 8px 20px;
    background: var(--orange);
    color: white;
    border-radius: 8px;
    font-size: 13px;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.2s;
}
.goods-ended-panel .ended-link:hover {
    background: #e55c00;
    transform: translateY(-1px);
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray);
}
.empty-state .icon {
    font-size: 50px;
    margin-bottom: 15px;
    opacity: 0.5;
}
.empty-state p {
    font-size: 14px;
}

/* 底部 - 与首页完全一致 */
.footer {
    background: var(--sub);
    color: rgba(255,255,255,0.8);
    padding: 40px 0;
    font-size: 13px;
    text-align: center;
    margin-top: 40px;
}
.footer p {
    margin-bottom: 8px;
}
.footer a {
    color: rgba(255,255,255,0.8);
    margin: 0 5px;
    text-decoration: none;
    transition: color 0.2s;
}
.footer a:hover {
    color: var(--main);
}

/* 响应式 */
@media (max-width: 1250px) {
    .container, .main-container {
        width: 95%;
        margin: 20px auto;
    }
}

@media (max-width: 768px) {
    .hero-ad {
        flex-direction: column;
        text-align: center;
    }
    .hero-right {
        flex-direction: column;
    }
    .nav {
        height: auto;
        padding: 10px 0;
    }
    .nav .container {
        flex-wrap: wrap;
        gap: 10px;
    }
    .two-column {
        flex-direction: column;
    }
    .bid-section {
        position: static;
        max-height: none;
    }
    .inventory-section {
        overflow-x: auto;
    }
    .inventory-table {
        min-width: 600px;
    }
}