* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f5f5f5;
    min-height: 100vh;
    overflow-y: scroll;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 头部 */
header {
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 1rem 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
}

body {
    padding-top: 70px;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

h1 {
    font-size: 1.5rem;
    color: #2c3e50;
}

h2 {
    margin-bottom: 1.5rem;
    color: #2c3e50;
    font-size: 1.3rem;
}

/* 按钮 */
.btn {
    display: inline-block;
    background: #007bff;
    color: white !important;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn:hover {
    background: #0056b3;
    transform: translateY(-1px);
    color: white !important;
}

.btn-secondary {
    background: #6c757d;
    color: white !important;
}

.btn-secondary:hover {
    background: #545b62;
    color: white !important;
}

.btn-success {
    background: #28a745;
    color: white !important;
}

.btn-success:hover {
    background: #1e7e34;
    color: white !important;
}

.btn-danger {
    background: #dc3545;
    color: white !important;
}

.btn-danger:hover {
    background: #c82333;
    color: white !important;
}

.btn-warning {
    background: #ffc107;
    color: #212529;
}

.btn-warning:hover {
    background: #e0a800;
}

.btn:disabled {
    background: #e9ecef;
    color: #6c757d;
    cursor: not-allowed;
    transform: none;
}

.btn:disabled:hover {
    background: #e9ecef;
    transform: none;
}

.btn-small {
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 6px;
    min-width: 90px;
    text-align: center;
    display: inline-block;
    line-height: 1.3;
    border: 1px solid transparent;
    transition: all 0.2s ease;
    background: #007bff;
    color: white !important;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.btn-small:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    color: white !important;
    background: #0056b3;
}

/* 用户信息 */
#userInfo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

#userInfo .btn-icon-only {
    flex-shrink: 0;
}

#userInfo span {
    margin-right: 0.5rem;
}
/* 管理员信息 */
#adminInfo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: nowrap;
    margin-left: auto;
}

#adminInfo span {
    margin-right: 0.5rem;
    white-space: nowrap;
}
.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
}

/* ==================== 模态框 ==================== */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    overflow-y: auto;
    padding: 20px;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    margin: 0 auto;
    padding: 1.5rem;
    border-radius: 12px;
    width: 100%;
    max-width: 450px;
    position: relative;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    animation: modalSlideIn 0.3s ease;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-large {
    max-width: 700px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}

.close {
    position: absolute;
    right: 15px;
    top: 10px;
    font-size: 1.8rem;
    cursor: pointer;
    color: #999;
    line-height: 1;
    z-index: 10;
}

.close:hover {
    color: #333;
}

/* 未支付订单模态框样式 */
.unpaid-orders-list {
    max-height: 300px;
    overflow-y: auto;
    margin: 1rem 0;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 0.5rem;
}

.unpaid-order-item {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 0.8rem;
    margin-bottom: 0.5rem;
    border-left: 4px solid #ffc107;
}

.unpaid-order-item:last-child {
    margin-bottom: 0;
}

.unpaid-order-item p {
    margin: 0.2rem 0;
    font-size: 0.9rem;
}

.unpaid-order-item strong {
    color: #2c3e50;
}

.modal-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.modal-actions .btn {
    flex: 1;
    min-width: 120px;
}

.btn-primary {
    background: #007bff;
    color: white !important;
}

.btn-primary:hover {
    background: #0056b3;
    color: white !important;
}

/* 移动端适配 */
@media (max-width: 480px) {
    .modal-actions {
        flex-direction: column;
    }
    
    .modal-actions .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .unpaid-order-item {
        padding: 0.6rem;
    }
}

.modal-content h2 {
    margin-bottom: 1rem;
    padding-right: 30px;
}

.modal-content input {
    width: 100%;
    padding: 0.8rem;
    margin: 0.5rem 0;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.modal-content form {
    margin-bottom: 1rem;
}

.modal-content form .btn {
    width: 100%;
    padding: 0.8rem;
    margin-top: 0.5rem;
}

.auth-switch {
    text-align: center;
    margin-top: 1rem;
    color: #666;
    font-size: 0.9rem;
}

.auth-switch a {
    color: #3498db;
    text-decoration: none;
    margin-left: 0.3rem;
}

/* ==================== 凭证查看模态框 ==================== */
.proofs-modal-content {
    padding: 0.5rem 0;
}

.proofs-modal-content h3 {
    margin-bottom: 0.5rem;
    color: #2c3e50;
    font-size: 1.1rem;
}

.proofs-modal-content > p {
    margin: 0.3rem 0;
    color: #666;
    font-size: 0.9rem;
}

.proofs-modal-content hr {
    border: none;
    border-top: 1px solid #eee;
    margin: 1rem 0;
}

.proof-section {
    margin: 1rem 0;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.proof-section h4 {
    margin: 0 0 0.8rem 0;
    color: #34495e;
    font-size: 1rem;
}

.proof-section p {
    margin: 0.3rem 0;
    color: #555;
    font-size: 0.9rem;
}

.proof-image-large {
    width: 100%;
    max-height: 400px;
    object-fit: contain;
    border-radius: 8px;
    margin-top: 0.8rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    cursor: pointer;
}

.no-proof {
    color: #999;
    font-style: italic;
    padding: 1.5rem;
    text-align: center;
    background: #f8f9fa;
    border-radius: 8px;
}

/* 凭证画廊 */
.proofs-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.8rem;
    margin-top: 0.8rem;
}

.proofs-gallery .proof-image-large {
    width: 100%;
    height: 200px;
    object-fit: cover;
    margin: 0;
}

/* 用户端凭证画廊 */
.proofs-gallery.user-proofs {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin: 0.8rem 0;
}

.proofs-gallery .proof-thumb {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid #e0e0e0;
    transition: all 0.2s;
}

.proofs-gallery .proof-thumb:hover {
    border-color: #3498db;
    transform: scale(1.02);
}

.proofs-gallery .proof-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.proofs-gallery .proof-thumb .proof-index {
    position: absolute;
    top: 4px;
    left: 4px;
    background: rgba(0,0,0,0.6);
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 4px;
}

/* 凭证区块样式 */
.proof-section-box {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid #e9ecef;
}

.proof-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.8rem;
}

.proof-section-header h4 {
    margin: 0;
    color: #2c3e50;
    font-size: 1rem;
}

.proof-count {
    font-size: 0.85rem;
    color: #7f8c8d;
    background: #e9ecef;
    padding: 2px 8px;
    border-radius: 12px;
}

.proof-count.verified {
    background: #d4edda;
    color: #155724;
}

/* 凭证预览模态框 */
.proof-preview-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.proof-preview-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.proof-preview-content img {
    max-width: 100%;
    max-height: 85vh;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.proof-preview-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.proof-preview-close:hover {
    transform: scale(1.2);
}

/* 移动端凭证画廊适配 */
@media (max-width: 480px) {
    .proofs-gallery.user-proofs {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.4rem;
    }
    
    .proof-section-box {
        padding: 0.8rem;
    }
    
    .proof-section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.3rem;
    }
}

/* ==================== 商品网格 ==================== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.5rem 1.25rem;
    margin-top: 2rem;
}

.product-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.1);
}

/* 商品缩略图容器 */
.product-image-wrapper {
    position: relative;
    width: 100%;
    padding-top: 133%; /* 3:4 宽高比，更适合商品展示 */
    overflow: hidden;
    background: #fafafa;
}

.product-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card:hover .product-image {
    transform: scale(1.08);
}

.product-image-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 0.9rem;
}

/* 商品信息区域 */
.product-info {
    padding: 1.2rem;
    background: white;
}

.product-card h3 {
    margin-bottom: 0.5rem;
    color: #18181b;
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s;
}

.product-card:hover h3 {
    color: #3b82f6;
}

.product-desc {
    color: #71717a;
    font-size: 0.8rem;
    margin-bottom: 0.75rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price {
    font-size: 1.25rem;
    color: #18181b;
    font-weight: 600;
    margin: 0.75rem 0 0.5rem 0;
    letter-spacing: -0.02em;
}

.product-stock {
    color: #22c55e;
    font-size: 0.75rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.product-stock::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #22c55e;
}

.out-of-stock {
    color: #ef4444;
}

.out-of-stock::before {
    background: #ef4444;
}

/* ==================== 商品详情页 ==================== */
.product-detail-container {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 1rem;
}

.product-detail-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.product-detail-image img {
    width: 100%;
    border-radius: 8px;
}

.product-detail-image .image-placeholder {
    width: 100%;
    height: 300px;
    background: #f0f0f0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
}

.product-detail-info h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.product-price-large {
    font-size: 1.8rem;
    color: #e74c3c;
    font-weight: bold;
    margin: 1rem 0;
}

.price-breakdown {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 4px;
    margin: 1rem 0;
}

.price-breakdown p {
    margin: 0.5rem 0;
    color: #666;
}

.product-description {
    line-height: 1.8;
    color: #555;
    margin: 1rem 0;
}

.btn-large {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
    margin-top: 1rem;
}

/* 立即购买按钮 */
.btn-purchase {
    background: #333;
    color: white;
}

.btn-purchase:hover {
    background: #000;
}

.btn-purchase:disabled {
    background: #ccc;
    cursor: not-allowed;
}
/* ==================== 管理后台 ==================== */

.form-container {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.form-container input,
.form-container textarea {
    width: 100%;
    padding: 0.8rem;
    margin: 0.5rem 0;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.form-container textarea {
    min-height: 80px;
    resize: vertical;
}

/* ==================== 表格 ==================== */
.table-container {
    overflow-x: auto;
    background: white;
    border-radius: 8px;
}

table {
    width: 100%;
    min-width: 800px;
    background: white;
    border-collapse: collapse;
}

table th,
table td {
    padding: 0.8rem;
    text-align: left;
    border-bottom: 1px solid #eee;
    font-size: 0.9rem;
}

table th {
    background: #f8f9fa;
    font-weight: 600;
    white-space: nowrap;
}

table td .btn {
    margin-right: 0.3rem;
    margin-bottom: 0.3rem;
}

table td .btn-icon-small {
    margin-right: 0.3rem;
    margin-bottom: 0.3rem;
}

table td .btn-with-icon {
    margin-right: 0.3rem;
    margin-bottom: 0.3rem;
}

/* ==================== 订单列表 ==================== */
.order-item {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 15px;
}

.order-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.order-item-content {
    flex: 1;
}

.order-item-actions {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-end;
}

.order-item-actions .btn {
    min-width: 80px;
}

.order-status {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    font-size: 0.8rem;
}

.status-pending_deposit,
.status-pending_deposit_review,
.status-pending_final {
    background: #f39c12;
    color: white;
}

.status-deposit_rejected,
.status-final_rejected {
    background: #e74c3c;
    color: white;
}

.status-deposit_paid {
    background: #3498db;
    color: white;
}

.status-final_paid,
.status-completed {
    background: #27ae60;
    color: white;
}

.status-cancelled {
    background: #95a5a6;
    color: white;
}

.status-shipped {
    background: #8e44ad;
    color: white;
}

.status-received {
    background: #2c3e50;
    color: white;
}

/* ==================== 订单详情 ==================== */
#orderDetail {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.order-detail-container {
    background: white;
    border-radius: 8px;
    margin-top: 1rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    overflow: hidden;
}

.order-product-mini {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-bottom: 2px solid #e9ecef;
}

.order-product-mini img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.order-product-mini .mini-placeholder {
    width: 70px;
    height: 70px;
    background: #dee2e6;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    color: #6c757d;
    flex-shrink: 0;
}

.mini-info {
    flex: 1;
    min-width: 0;
}

.mini-info h3 {
    margin: 0;
    font-size: 1rem;
    color: #2c3e50;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.order-number {
    margin: 0.3rem 0 0 0;
    font-size: 0.8rem;
    color: #6c757d;
    word-break: break-all;
}

.order-status-bar {
    padding: 0.8rem;
    text-align: center;
    background: white;
}

.order-price-info {
    padding: 1rem;
    background: white;
}

.price-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem;
    margin-bottom: 0.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #dee2e6;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.price-item.paid {
    background: #d4edda;
    border-left-color: #28a745;
}

.price-label {
    font-weight: 600;
    color: #495057;
}

.price-amount {
    font-size: 1.2rem;
    font-weight: bold;
    color: #e74c3c;
}

.price-status {
    color: #6c757d;
    font-size: 0.85rem;
    width: 100%;
    text-align: right;
}

.price-item.paid .price-status {
    color: #28a745;
}

/* 收款码 */
.payment-qr-section {
    padding: 1.5rem;
    text-align: center;
    background: white;
    border-top: 1px solid #e9ecef;
}

.payment-qr-section h3 {
    margin-bottom: 1rem;
    color: #2c3e50;
    font-size: 1rem;
}

.payment-qr-code {
    max-width: 250px;
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.qr-tip {
    margin-top: 0.8rem;
    color: #6c757d;
    font-size: 0.85rem;
}

/* 上传凭证 */
.upload-proof-section {
    padding: 1.5rem;
    background: white;
    border-top: 1px solid #e9ecef;
}

.upload-proof-section h3 {
    margin-bottom: 1rem;
    color: #2c3e50;
    font-size: 1rem;
}

.proof-upload-box {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border: 2px dashed #dee2e6;
}

.proof-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.8rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.proof-header h4 {
    margin: 0;
    color: #34495e;
    font-size: 0.95rem;
}

.required-amount {
    background: #fff3cd;
    color: #856404;
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

.proof-upload-box input[type="file"] {
    display: block;
    margin: 0.8rem 0;
    padding: 0.6rem;
    border: 2px solid #dee2e6;
    border-radius: 4px;
    width: 100%;
    cursor: pointer;
    background: white;
    font-size: 0.9rem;
}

.btn-upload {
    width: 100%;
    padding: 0.8rem;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

/* 图片预览 */
.image-preview {
    margin: 0.8rem 0;
    text-align: center;
}

.image-preview img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.preview-filename {
    margin-top: 0.5rem;
    color: #666;
    font-size: 0.85rem;
}

/* 凭证状态 */
.proof-status {
    background: #d4edda;
    border: 2px solid #c3e6cb;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    display: flex;
    gap: 0.8rem;
    align-items: flex-start;
}

.status-icon {
    font-size: 1.5rem;
    color: #28a745;
}

.status-text {
    flex: 1;
}

.status-text p {
    margin: 0.2rem 0;
    color: #155724;
    font-size: 0.9rem;
}

.status-note {
    font-size: 0.85rem;
    color: #6c757d !important;
}

.proof-waiting {
    background: #fff3cd;
    border: 2px solid #ffeaa7;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    display: flex;
    gap: 0.8rem;
    align-items: flex-start;
}

.waiting-icon {
    font-size: 1.5rem;
}

.waiting-text p {
    margin: 0.2rem 0;
    color: #856404;
    font-size: 0.9rem;
}

.order-detail-footer {
    padding: 0.8rem 1rem;
    background: #f8f9fa;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.create-time {
    margin: 0;
    color: #6c757d;
    font-size: 0.85rem;
}

.order-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.order-actions .btn {
    min-width: 120px;
    padding: 8px 16px;
    font-size: 14px;
}

/* 凭证审核页面 */
.proof-item {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.proof-image {
    max-width: 250px;
    width: 100%;
    border-radius: 4px;
}

.proof-info {
    flex: 1;
    min-width: 200px;
}

.ai-result {
    background: #ecf0f1;
    padding: 0.8rem;
    border-radius: 4px;
    margin: 0.8rem 0;
    font-size: 0.9rem;
}

/* ==================== 响应式适配 ==================== */
@media (max-width: 992px) {
    .product-detail-layout {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    table {
        min-width: 600px;
    }
}

@media (max-width: 768px) {
    header .container {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
    
    h1 {
        font-size: 1.3rem;
    }
    
    #userInfo {
        width: auto;
        justify-content: flex-end;
        flex-wrap: nowrap;
    }
    
    #adminInfo {
        width: auto;
        justify-content: flex-end;
        flex-wrap: nowrap;
    }
    
    /* 商品详情页面 */
    #productDetailSection {
        padding-bottom: 80px;
    }
    
    /* 立即购买按钮固定在底部 */
    .btn-purchase {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        margin: 0;
        border-radius: 0;
        z-index: 999;
        padding: 1.2rem;
        font-size: 1.1rem;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 1.25rem 1rem;
    }
    }
    
    .product-info {
        padding: 0.8rem;
    }
    
    .product-card h3 {
        font-size: 0.9rem;
    }
    
    .product-price {
        font-size: 1.1rem;
    }
    
    .modal-content {
        padding: 1.2rem;
        margin: 10px;
        width: calc(100% - 20px);
    }
    
    .modal-large {
        max-height: calc(100vh - 20px);
    }
    
    .order-product-mini {
        flex-direction: column;
        text-align: center;
    }
    
    .mini-info h3 {
        white-space: normal;
    }
    
    .price-item {
        flex-direction: column;
        text-align: center;
    }
    
    .price-status {
        text-align: center;
    }
    
    .admin-nav {
        flex-wrap: nowrap;
        gap: 5px;
    }
    
    .nav-btn {
        flex: 1 1 0;
        min-width: 0;
        padding: 8px 12px;
        font-size: 0.85rem;
        text-align: center;
    }
    
    table {
        min-width: 500px;
        font-size: 0.85rem;
    }
    
    table th,
    table td {
        padding: 0.6rem 0.4rem;
    }
    
    .btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
    }


@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }
    
    .products-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1rem 0.75rem;
    }
    
    .product-info {
        padding: 0.9rem;
    }
    
    .product-card h3 {
        font-size: 0.85rem;
    }
    
    .product-price {
        font-size: 1rem;
        margin: 0.5rem 0;
    }
    
    .product-desc {
        display: none;
    }
    
    .order-detail-container {
        margin-top: 0.5rem;
    }
    
    .order-product-mini img,
    .order-product-mini .mini-placeholder {
        width: 60px;
        height: 60px;
    }
    
    .payment-qr-code {
        max-width: 200px;
    }
    
    .proof-image-large {
        max-height: 300px;
    }
}

/* ==================== 地址管理样式 ==================== */

.address-selection-modal {
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
}

.address-list {
    max-height: 400px;
    overflow-y: auto;
    margin: 20px 0;
}

.address-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.address-item:hover {
    border-color: #007bff;
    background-color: #f8f9fa;
}

.address-item.selected {
    border-color: #007bff;
    background-color: #e3f2fd;
}

.address-info {
    flex: 1;
}

.address-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 5px;
}

.address-name {
    font-weight: bold;
    color: #333;
}

.address-phone {
    color: #666;
    font-size: 14px;
}

.default-tag {
    background-color: #28a745;
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
}

.address-detail {
    color: #666;
    font-size: 14px;
    line-height: 1.4;
}

.address-actions {
    display: flex;
    gap: 5px;
}

/* Small button color variants */
.btn-small.btn-success {
    background: #28a745;
    border-color: #28a745;
    color: white !important;
}

.btn-small.btn-success:hover {
    background: #218838;
    border-color: #1e7e34;
    color: white !important;
}

.btn-small.btn-danger {
    background: #dc3545;
    border-color: #dc3545;
    color: white !important;
}

.btn-small.btn-danger:hover {
    background: #c82333;
    border-color: #bd2130;
    color: white !important;
}

.btn-small.btn-primary {
    background: #007bff;
    border-color: #007bff;
    color: white !important;
}

.btn-small.btn-primary:hover {
    background: #0056b3;
    border-color: #004085;
    color: white !important;
}

.btn-small.btn-secondary {
    background: #6c757d;
    border-color: #6c757d;
    color: white !important;
}

.btn-small.btn-secondary:hover {
    background: #545b62;
    border-color: #4e555b;
    color: white !important;
}

.address-form-modal {
    max-width: 500px;
}

.address-form-modal .form-row {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.address-form-modal .form-row input {
    flex: 1;
}

.address-form-modal input,
.address-form-modal textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

.address-form-modal textarea {
    height: 80px;
    resize: vertical;
    margin-bottom: 15px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.order-address-info {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #007bff;
}

.order-address-info h4 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 16px;
}

.order-address-info .address-detail p {
    margin: 5px 0;
    color: #666;
    line-height: 1.4;
}

.order-address-info .address-detail p:first-child {
    color: #333;
    font-weight: 500;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .address-selection-modal,
    .address-form-modal {
        max-width: 95%;
        margin: 10px;
    }
    
    .address-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .address-actions {
        align-self: flex-end;
    }
    
    .address-form-modal .form-row {
        flex-direction: column;
        gap: 10px;
    }
}
/* ==================== 管理后台样式 ==================== */

.admin-nav {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    padding-bottom: 0;
}

.nav-btn {
    flex: 0 1 auto;
    min-width: 120px;
    padding: 10px 20px;
    border: none;
    background: rgba(0, 123, 255, 0.1);
    color: #007bff;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.95rem;
    font-weight: 500;
    white-space: nowrap;
}

.nav-btn.active {
    background: #007bff;
    color: white;
}

.nav-btn:hover {
    background: rgba(0, 123, 255, 0.2);
    transform: translateY(-1px);
}

.nav-btn.active:hover {
    background: #0056b3;
}

.admin-section {
    margin-top: 20px;
}

.form-container {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.form-container input,
.form-container textarea,
.form-container select {
    width: 100%;
    padding: 10px;
    margin: 5px 0;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

.table-container {
    overflow-x: auto;
    margin: 20px 0;
}

.table-container table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.table-container th,
.table-container td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.table-container th {
    background: #f8f9fa;
    font-weight: bold;
    color: #333;
}

.table-container tr:hover {
    background: #f8f9fa;
}

.order-status {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
}

.status-pending_deposit {
    background: #fff3cd;
    color: #856404;
}

.status-pending_deposit_review {
    background: #d1ecf1;
    color: #0c5460;
}

.status-deposit_paid {
    background: #d4edda;
    color: #155724;
}

.status-pending_final {
    background: #d1ecf1;
    color: #0c5460;
}

.status-final_paid {
    background: #d4edda;
    color: #155724;
}

.status-completed {
    background: #d4edda;
    color: #155724;
}

.status-cancelled {
    background: #f8d7da;
    color: #721c24;
}

/* 凭证显示样式 */
.proof-item {
    display: flex;
    gap: 20px;
    padding: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 20px;
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.proof-image {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #ddd;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.proof-image:hover {
    transform: scale(1.05);
}

.proof-info {
    flex: 1;
}

.proof-info h3 {
    margin: 0 0 10px 0;
    color: #333;
}

.proof-info p {
    margin: 5px 0;
    color: #666;
}

.ai-result {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    margin: 15px 0;
    border-left: 4px solid #007bff;
}

.ai-result h4 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 14px;
}

.ai-result p {
    margin: 5px 0;
    font-size: 13px;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 20px;
    border-radius: 8px;
    width: 80%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.modal-large {
    max-width: 900px;
}

.close {
    position: absolute;
    right: 15px;
    top: 15px;
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
}

.close:hover {
    color: #000;
}

.proofs-modal-content h3 {
    margin-top: 0;
    color: #333;
}

.proof-section {
    margin: 20px 0;
}

.proof-section h4 {
    color: #333;
    margin-bottom: 10px;
}

.proofs-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 15px 0;
}

.proof-image-large {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #ddd;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.proof-image-large:hover {
    transform: scale(1.1);
}

.no-proof {
    color: #999;
    font-style: italic;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 4px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .admin-nav {
        flex-direction: row;
        gap: 5px;
    }
    
    .nav-btn {
        flex: 1 1 0;
        min-width: 0;
        padding: 8px 8px;
        font-size: 0.8rem;
    }
    
    .proof-item {
        flex-direction: column;
    }
    
    .proof-image {
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }
    
    .modal-content {
        width: 95%;
        margin: 2% auto;
        max-height: 95vh;
    }
    
    .proofs-gallery {
        justify-content: center;
    }
    
    .proof-image-large {
        width: 120px;
        height: 120px;
    }
}
/* 地址信息显示样式 */
.address-info-section {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
    border-left: 4px solid #28a745;
}

.address-info-section h4 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 16px;
}

.address-details p {
    margin: 5px 0;
    color: #666;
    line-height: 1.4;
}

.address-details p strong {
    color: #333;
    font-weight: 600;
}

.no-address {
    color: #dc3545;
    font-style: italic;
    padding: 10px;
    background: #f8d7da;
    border-radius: 4px;
    border: 1px solid #f5c6cb;
}

/* 表格样式优化 */
.table-container table th,
.table-container table td {
    padding: 8px 12px;
    font-size: 13px;
    vertical-align: middle;
}

.table-container table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
}

.table-container table tbody tr:hover {
    background: #f8f9fa;
}

/* Table button styles - inherits from .btn-small above */

/* 凭证审核按钮样式 */
.proof-info .btn {
    margin: 5px 5px 5px 0;
    min-width: 80px;
}

.proof-info .btn-success {
    background: #28a745;
    border-color: #28a745;
    color: white;
}

.proof-info .btn-success:hover {
    background: #218838;
    border-color: #1e7e34;
    color: white;
}

.proof-info .btn-danger {
    background: #dc3545;
    border-color: #dc3545;
    color: white;
}

.proof-info .btn-danger:hover {
    background: #c82333;
    border-color: #bd2130;
    color: white;
}
/* ==================== 省市区选择器样式 ==================== */

.region-selector {
    margin-bottom: 15px;
}

.region-input {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.region-input:hover {
    border-color: #007bff;
}

.region-input span {
    color: #333;
}

.region-input .region-arrow {
    color: #999;
    font-weight: bold;
    transform: rotate(90deg);
    transition: transform 0.3s ease;
}

.region-input:hover .region-arrow {
    color: #007bff;
}

.region-picker-modal .modal-content {
    max-width: 500px;
    max-height: 80vh;
}

.region-picker-content {
    padding: 20px;
}

.region-picker {
    display: flex;
    flex-direction: column;
    height: 500px;
}

.region-tabs {
    display: flex;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 15px;
}

.region-tab {
    flex: 1;
    padding: 10px;
    text-align: center;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
    color: #666;
}

.region-tab.active {
    color: #007bff;
    border-bottom-color: #007bff;
    background: #f8f9fa;
}

.region-tab:hover {
    background: #f8f9fa;
}

.region-lists {
    flex: 1;
    position: relative;
    overflow: hidden;
}

.region-list {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow-y: auto;
    display: none;
    padding: 5px 0;
}

.region-list.active {
    display: block;
}

.region-item {
    padding: 10px 15px;
    cursor: pointer;
    border-radius: 4px;
    margin: 2px 0;
    transition: background-color 0.3s ease;
}

.region-item:hover {
    background: #f8f9fa;
    color: #007bff;
}

.region-item:active {
    background: #e3f2fd;
}

.region-breadcrumb {
    padding: 10px 0;
    border-top: 1px solid #e0e0e0;
    margin-top: 15px;
    color: #666;
    font-size: 14px;
}

.region-breadcrumb span {
    color: #007bff;
    font-weight: 500;
}

/* 地址表单样式优化 */
.address-form-modal {
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    margin: 0;
}

.address-form-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.address-form-header h2 {
    margin: 0 0 10px 0;
    color: #2c3e50;
    font-size: 24px;
    font-weight: 600;
}

.form-subtitle {
    margin: 0;
    color: #7f8c8d;
    font-size: 14px;
    line-height: 1.5;
}

.address-form {
    padding: 0;
}

.form-section {
    margin-bottom: 30px;
    padding: 20px;
    background: #fafbfc;
    border-radius: 12px;
    border: 1px solid #e9ecef;
}

.section-title {
    display: flex;
    align-items: center;
    margin: 0 0 20px 0;
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
}

.section-icon {
    margin-right: 8px;
    font-size: 18px;
}

.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #34495e;
    font-size: 14px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: white;
    box-sizing: border-box;
}

.form-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.form-input::placeholder {
    color: #95a5a6;
}

textarea.form-input {
    min-height: 80px;
    resize: vertical;
    font-family: inherit;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.address-form input,
.address-form textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: white;
    box-sizing: border-box;
}

.address-form input:focus,
.address-form textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.address-form input.error,
.address-form textarea.error {
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.address-form textarea {
    height: 80px;
    resize: vertical;
    font-family: inherit;
    line-height: 1.5;
}

.form-hint {
    margin-top: 6px;
    font-size: 12px;
    color: #95a5a6;
    line-height: 1.4;
}

.field-error {
    margin-top: 6px;
    font-size: 12px;
    color: #e74c3c;
    display: flex;
    align-items: center;
}

.field-error::before {
    content: "⚠️";
    margin-right: 4px;
}

.char-counter {
    position: absolute;
    bottom: 8px;
    right: 12px;
    font-size: 11px;
    color: #999;
    background: rgba(255, 255, 255, 0.9);
    padding: 2px 4px;
    border-radius: 3px;
}

.checkbox-group {
    background: white;
    padding: 16px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    margin: 0;
    font-size: 14px;
    color: #2c3e50;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin: 0;
    cursor: pointer;
}

.region-selector {
    position: relative;
}

.region-input {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 20px;
}

.region-input:hover {
    border-color: #3498db;
}

.region-input span {
    color: #2c3e50;
    font-size: 14px;
}

.region-input .region-arrow {
    color: #7f8c8d;
    font-size: 12px;
    transition: transform 0.3s ease;
}

.region-input:hover .region-arrow {
    color: #3498db;
    transform: rotate(180deg);
}

.modal-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.modal-actions .btn {
    flex: 1;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.btn-icon {
    font-size: 16px;
}

.modal-actions .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .address-form-modal {
        max-width: 95%;
        margin: 10px;
        max-height: 95vh;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .form-section {
        padding: 15px;
        margin-bottom: 20px;
    }
    
    .modal-actions {
        flex-direction: column;
    }
    
    .modal-actions .btn {
        width: 100%;
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .region-picker-modal .modal-content {
        max-width: 95%;
        margin: 5px;
        max-height: 95vh;
        padding: 15px;
    }
    
    .region-picker-content {
        padding: 10px;
    }
    
    .region-picker {
        height: 60vh;
        min-height: 500px;
    }
    
    .region-tabs {
        font-size: 15px;
        margin-bottom: 10px;
    }
    
    .region-tab {
        padding: 12px 8px;
        font-weight: 500;
    }
    
    .region-item {
        padding: 15px 20px;
        font-size: 16px;
        margin: 1px 0;
    }
    
    .region-breadcrumb {
        padding: 12px 0;
        font-size: 15px;
    }
}

/* 小屏手机优化 */
@media (max-width: 480px) {
    .region-picker-modal .modal-content {
        max-width: 98%;
        margin: 2px;
        max-height: 98vh;
        padding: 10px;
    }
    
    .region-picker-content {
        padding: 5px;
    }
    
    .region-picker {
        height: 70vh;
        min-height: 550px;
    }
    
    .region-tabs {
        font-size: 14px;
        margin-bottom: 8px;
    }
    
    .region-tab {
        padding: 10px 6px;
        font-size: 14px;
    }
    
    .region-item {
        padding: 18px 15px;
        font-size: 16px;
        margin: 0;
        border-bottom: 1px solid #f0f0f0;
    }
    
    .region-item:last-child {
        border-bottom: none;
    }
    
    .region-breadcrumb {
        padding: 10px 0;
        font-size: 14px;
    }
    
    .address-form-modal {
        max-width: 95%;
        margin: 10px;
    }
    
    .address-form-modal .form-row {
        flex-direction: column;
        gap: 10px;
    }
}


/* 发送验证码按钮 */
#sendCodeBtn {
    background: #fff;
    color: #333;
    border: 1px solid #ddd;
    padding: 10px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    white-space: nowrap;
    flex-shrink: 0;
    transition: all 0.2s ease;
    font-weight: 500;
}

#sendCodeBtn:hover {
    background: #f8f8f8;
    border-color: #bbb;
}

#sendCodeBtn:disabled {
    background: #f5f5f5;
    color: #999;
    cursor: not-allowed;
    border-color: #e0e0e0;
}
