/* 主布局 */
.main-layout {
    display: grid;
    grid-template-columns: 4fr 6fr;
    gap: 20px;
    align-items: stretch;
    height: calc(100vh - 200px);
    overflow: hidden;
}

/* 需求侧边栏 */
.req-sidebar {
    background: #fff;
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    max-height: 100%;
    border: 1px solid #eef0f2;
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f2f3f5;
}

.sidebar-header h2 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: #1a1a2e;
    letter-spacing: -0.01em;
}

/* 侧边栏创建需求按钮 */
.create-req-sidebar-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #c4a882 0%, #a89070 100%);
    color: white;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s;
    box-shadow: 0 2px 8px rgba(196, 168, 130, 0.3);
    white-space: nowrap;
}

.create-req-sidebar-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(196, 168, 130, 0.4);
}

.create-req-sidebar-btn:active {
    transform: translateY(0);
}

.req-list {
    flex: 1;
    overflow-y: auto;
    padding-right: 2px;
    min-height: 0;
}

.req-list::-webkit-scrollbar {
    width: 4px;
}

.req-list::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 2px;
}

.req-list::-webkit-scrollbar-thumb {
    background: #e0e3e8;
    border-radius: 2px;
}

.req-list::-webkit-scrollbar-thumb:hover {
    background: #c8ccd4;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

.empty-state .icon {
    font-size: 3rem;
    margin-bottom: 12px;
}

.empty-state .text {
    font-size: 0.9rem;
}

.empty-state .hint {
    font-size: 0.78rem;
    color: #bbb;
    margin-top: 8px;
}

/* 需求列表项 */
.req-item {
    position: relative;
    padding: 12px;
    border-radius: 12px;
    cursor: pointer;
    margin-bottom: 8px;
    border: 2px solid transparent;
    transition: all 0.2s ease;
    background: #fafbfc;
}

.req-item:hover {
    background: #f0f2ff;
    border-color: #d0d5ff;
}

.req-item-selected {
    background: #eef0ff !important;
    border-color: #c4a882 !important;
    box-shadow: 0 0 0 1px rgba(196, 168, 130, 0.2);
}

.req-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.req-item-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1a1a2e;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 160px;
}

.req-item-status {
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 500;
    white-space: nowrap;
}

.status-pending_contact {
    background: #fff3cd;
    color: #856404;
}

.status-contacting {
    background: #cce5ff;
    color: #004085;
}

.status-pending_payment {
    background: #fce4d6;
    color: #bf5a02;
}

.status-pending_production {
    background: #e8daef;
    color: #6c3483;
}

.status-in_production {
    background: #d1ecf1;
    color: #0c5460;
}

.status-completed {
    background: #d4edda;
    color: #155724;
}

.status-draft_completed {
    background: #d4efdf;
    color: #1d8348;
}

.status-delivered {
    background: #d5f5e3;
    color: #0e6655;
}

.status-pending_publish {
    background: #e8e8e8;
    color: #555;
}

.status-refunded {
    background: #fde8ea;
    color: #b52030;
}

.req-item-desc {
    font-size: 0.78rem;
    color: #888;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-bottom: 6px;
}

.req-item-category {
    display: inline-block;
    font-size: 0.68rem;
    padding: 2px 8px;
    border-radius: 4px;
    background: #eef0ff;
    color: #c4a882;
    font-weight: 500;
    margin-bottom: 6px;
}

.req-item-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.72rem;
    color: #aaa;
}

.req-item-footer span {
    display: flex;
    align-items: center;
    gap: 3px;
}

/* 未读消息 badge */
.req-unread-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: linear-gradient(135deg, #ef5350, #e53935);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    border-radius: 9px;
    margin-left: 6px;
    box-shadow: 0 1px 4px rgba(229, 57, 53, 0.35);
    animation: unreadPulse 2s infinite;
}

@keyframes unreadPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

.req-item-actions {
    display: flex;
    gap: 4px;
}

.req-item-actions .btn-icon {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    background: #f5f6f8;
    border: none;
    cursor: pointer;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    color: #888;
}

.req-item-actions .btn-icon:hover {
    background: #c4a882;
    color: white;
}

.btn-icon.btn-delete:hover {
    background: #e05353;
    color: white;
}

.btn-icon.btn-pay {
    background: #fef7e8;
    color: #e67e22;
}

.btn-icon.btn-pay:hover {
    background: #e67e22;
    color: white;
}

/* 加载更多 */
.load-more {
    text-align: center;
    padding: 16px;
    color: #999;
    font-size: 0.8rem;
}

.load-more-spinner {
    width: 24px;
    height: 24px;
    border: 2px solid #f0f0f0;
    border-top-color: #c4a882;
    border-radius: 50%;
    margin: 8px auto 0;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 聊天容器 */
.chat-container {
    min-width: 0;
    height: 100%;
    min-height: 0;
}

.chat-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    max-height: 100%;
    overflow: hidden;
    border: 1px solid #eef0f2;
}

.chat-header {
    display: flex;
    align-items: center;
    padding: 14px 20px;
    border-bottom: 1px solid #f2f3f5;
    gap: 10px;
    flex-shrink: 0;
}

.chat-header h2 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: #1a1a2e;
}

.chat-selected-req {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #eef0ff;
    border-radius: 8px;
    padding: 4px 10px;
    font-size: 0.8rem;
    color: #c4a882;
}

.chat-selected-req-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #c4a882;
}

.chat-selected-req-name {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-selected-req-clear {
    background: none;
    border: none;
    color: #aaa;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 0 2px;
    line-height: 1;
}

.chat-selected-req-clear:hover {
    color: #666;
}

/* 聊天操作栏（样稿确认等）- 位于输入框下方 */
.chat-action-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    background: #fafbfc;
    border-top: 1px solid #f2f3f5;
    flex-shrink: 0;
}
.chat-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border: none;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s;
}
.chat-action-btn.refund-btn {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.25);
}
.chat-action-btn.refund-btn:hover {
    background: linear-gradient(135deg, #c0392b 0%, #a93226 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(231, 76, 60, 0.4);
}
.chat-action-btn.refund-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}
.chat-action-btn.confirm-prod-btn {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(39, 174, 96, 0.2);
}
.chat-action-btn.confirm-prod-btn:hover {
    background: linear-gradient(135deg, #219a52 0%, #27ae60 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(39, 174, 96, 0.35);
}
.chat-action-btn.confirm-prod-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}
.chat-action-btn.deliver-btn {
    background: linear-gradient(135deg, #e67e22 0%, #f39c12 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(230, 126, 34, 0.2);
}
.chat-action-btn.deliver-btn:hover {
    background: linear-gradient(135deg, #d35400 0%, #e67e22 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(230, 126, 34, 0.35);
}
.chat-action-btn.deliver-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}
.chat-action-status {
    font-size: 0.8rem;
    color: #888;
    font-weight: 500;
    margin-left: auto;
}

/* 消息区 */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-height: 0;
}

.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #d0d5dd;
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.chat-empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
}

.chat-empty-icon {
    font-size: 3rem;
    margin-bottom: 12px;
}

.chat-empty-text {
    font-size: 0.95rem;
    color: #888;
    margin-bottom: 8px;
}

.chat-empty-hint {
    font-size: 0.8rem;
    color: #bbb;
    max-width: 300px;
    margin: 0 auto;
    line-height: 1.5;
}

/* 消息气泡 */
.chat-message {
    display: flex;
    gap: 10px;
    animation: fadeInUp 0.3s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-message-user {
    flex-direction: row-reverse;
}

.chat-message-partner {
    /* left-aligned, same as assistant */
}

.chat-message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    color: white;
    flex-shrink: 0;
}

.chat-message-user .chat-message-avatar {
    background: linear-gradient(135deg, #c4a882 0%, #a89070 100%);
}

.chat-message-assistant .chat-message-avatar {
    background: linear-gradient(135deg, #6dd5ed 0%, #2193b0 100%);
}

.chat-message-partner .chat-message-avatar {
    background: linear-gradient(135deg, #f5a623 0%, #e67e22 100%);
}

.chat-message-body {
    max-width: 75%;
}

.chat-message-role {
    font-size: 0.72rem;
    color: #999;
    margin-bottom: 4px;
}

/* 聊天角色标签 */
.chat-role-tag {
    display: inline-block;
    font-size: 0.68rem;
    padding: 1px 6px;
    border-radius: 4px;
    margin-left: 6px;
    font-weight: 500;
    vertical-align: middle;
}
.chat-role-tag-requester {
    background: #fff3e0;
    color: #e67e22;
}
.chat-role-tag-acceptor {
    background: #e8f5e9;
    color: #2e7d32;
}
.chat-role-tag-producer {
    background: #e8f0ff;
    color: #4a90e2;
}

.chat-message-user .chat-message-role {
    text-align: right;
}

.chat-message-content {
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 0.88rem;
    line-height: 1.5;
    word-break: break-word;
    white-space: pre-wrap;
}

.chat-message-user .chat-message-content {
    background: linear-gradient(135deg, #c4a882 0%, #a89070 100%);
    color: white;
    border-bottom-right-radius: 4px;
}

.chat-message-assistant .chat-message-content {
    background: #f5f6f8;
    color: #333;
    border-bottom-left-radius: 4px;
}

.chat-message-partner .chat-message-content {
    background: #fef7e8;
    color: #333;
    border-bottom-left-radius: 4px;
}

/* 消息中的图片 */
.chat-message-images {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}

.chat-message-image {
    max-width: 150px;
    max-height: 150px;
    border-radius: 8px;
    cursor: pointer;
    object-fit: cover;
    border: 1px solid #eef0f2;
    transition: transform 0.2s;
}

.chat-message-image:hover {
    transform: scale(1.05);
}

/* 输入区 */
.chat-input-area {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    padding: 12px 20px;
    border-top: 1px solid #f2f3f5;
    flex-shrink: 0;
}

.chat-input {
    flex: 1;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 10px 14px;
    font-size: 0.88rem;
    resize: none;
    outline: none;
    font-family: inherit;
    transition: border-color 0.2s;
    max-height: 120px;
}

.chat-input:focus {
    border-color: #c4a882;
    box-shadow: 0 0 0 3px rgba(196, 168, 130, 0.1);
}

.chat-input:disabled {
    background: #f8f9fa;
    color: #999;
}

.chat-send-btn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, #c4a882 0%, #a89070 100%);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.chat-send-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(196, 168, 130, 0.4);
}

.chat-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.chat-upload-btn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: #f5f6f8;
    border: 1px solid #e0e0e0;
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: all 0.2s;
    flex-shrink: 0;
}

.chat-upload-btn:hover {
    background: #eef0ff;
    color: #c4a882;
    border-color: #c4a882;
}

/* 媒体预览区（图片 + 视频） */
.media-preview-area {
    display: flex;
    gap: 6px;
    padding: 0 20px 8px;
    flex-wrap: wrap;
}

/* 上传进度条 */
.chat-upload-progress {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 20px 8px;
    margin: 0;
}
.chat-upload-progress-bar {
    flex: 1;
    height: 6px;
    background: #eef0f2;
    border-radius: 3px;
    overflow: hidden;
    transition: background 0.3s ease;
}
.chat-upload-progress-text {
    font-size: 0.8rem;
    color: #8b7e6a;
    white-space: nowrap;
    min-width: 70px;
    text-align: right;
}

.media-preview-item {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    background-size: cover;
    background-position: center;
    position: relative;
    border: 1px solid #eef0f2;
}

.media-preview-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.media-preview-video {
    background: #1a1a2e;
}

.media-preview-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    pointer-events: none;
}

.media-preview-remove {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #e74c3c;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 0.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 文档预览（上传预览区） */
.media-preview-doc {
    width: auto;
    min-width: 80px;
    max-width: 160px;
    height: 60px;
    background: #f0f4ff;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 12px;
    border-radius: 8px;
    border: 1px solid #d0d8f0;
    position: relative;
    overflow: hidden;
}

.media-preview-doc-icon {
    font-size: 1.3rem;
    flex-shrink: 0;
}

.media-preview-doc-name {
    font-size: 0.7rem;
    color: #555;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 110px;
}

/* 文档下载链接（聊天消息中） */
.chat-message-doc-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: #f0f4ff;
    border: 1px solid #d0d8f0;
    border-radius: 10px;
    text-decoration: none;
    color: #333;
    font-size: 0.85rem;
    transition: background 0.2s, border-color 0.2s;
    max-width: 280px;
}

.chat-message-doc-link:hover {
    background: #dce4ff;
    border-color: #c4a882;
}

.chat-message-doc-icon {
    font-size: 1.3rem;
    flex-shrink: 0;
}

.chat-message-doc-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 消息中的视频 */
.chat-message-video-wrap,
.chat-message-media-wrap {
    position: relative;
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #eef0f2;
}

.chat-message-video {
    max-width: 240px;
    max-height: 180px;
    display: block;
    border-radius: 8px;
    background: #1a1a2e;
}

.chat-message-video-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    pointer-events: none;
    z-index: 2;
}

/* 聊天媒体水印（平铺由 JS 动态生成 span，容器本身只需定位） */
.chat-watermark-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
    user-select: none;
}

/* 保留旧的图片预览样式作为兼容 */
.image-preview-area,
.image-preview-item,
.image-preview-remove {
    /* deprecated - 使用 media-preview-* 替代 */
}

/* ==================== 创建需求弹窗 ==================== */
.create-req-modal {
    max-width: 620px;
    max-height: 90vh;
    overflow: visible;
    display: flex;
    flex-direction: column;
    padding: 0;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    z-index: 2001;
    position: relative;
}

/* Flatpickr 日历面板 z-index 高于弹窗 */
.flatpickr-calendar {
    z-index: 9999 !important;
}

/* 弹窗顶部标题栏 */
.create-req-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 28px 20px;
    border-bottom: 1px solid #f0f1f3;
    flex-shrink: 0;
}

.create-req-header-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.create-req-header-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, #eef0ff 0%, #e8e0ff 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #c4a882;
    flex-shrink: 0;
}

.create-req-header-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1a1a2e;
    letter-spacing: -0.01em;
}

.create-req-header-subtitle {
    font-size: 0.8rem;
    color: #999;
    margin-top: 2px;
}

.create-req-close {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: none;
    background: #f5f6f8;
    color: #999;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.create-req-close:hover {
    background: #eef0f2;
    color: #555;
}

/* 弹窗主体 */
.create-req-body {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0;
    min-height: 0;
}

.req-modal-scroll {
    padding: 24px 28px;
}

.req-modal-scroll::-webkit-scrollbar {
    width: 5px;
}

.req-modal-scroll::-webkit-scrollbar-thumb {
    background: #d0d5dd;
    border-radius: 3px;
}

.req-modal-scroll::-webkit-scrollbar-track {
    background: transparent;
}

/* 表单字段组 */
.create-req-field-group {
    margin-bottom: 22px;
}

.create-req-field-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.88rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

.create-req-field-icon {
    font-size: 0.95rem;
}

.form-required {
    color: #e74c3c;
    font-weight: 700;
    font-size: 0.8rem;
}

.create-req-field-optional {
    font-size: 0.72rem;
    font-weight: 400;
    color: #bbb;
    background: #f8f9fa;
    padding: 2px 8px;
    border-radius: 4px;
    margin-left: auto;
}

.create-req-field-hint {
    font-size: 0.75rem;
    color: #bbb;
    margin-top: 6px;
    line-height: 1.4;
}

/* 输入框 */
.create-req-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e8eaed;
    border-radius: 10px;
    font-size: 0.95rem;
    outline: none;
    box-sizing: border-box;
    transition: all 0.25s;
    background: #fafbfc;
    color: #333;
}

.create-req-input:hover {
    border-color: #d0d5dd;
    background: #fff;
}

.create-req-input:focus {
    border-color: #c4a882;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(196, 168, 130, 0.08);
}

.create-req-input::placeholder {
    color: #bbb;
}

.create-req-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e8eaed;
    border-radius: 10px;
    font-size: 0.95rem;
    outline: none;
    resize: vertical;
    font-family: inherit;
    min-height: 100px;
    box-sizing: border-box;
    transition: all 0.25s;
    background: #fafbfc;
    color: #333;
    line-height: 1.6;
}

.create-req-textarea:hover {
    border-color: #d0d5dd;
    background: #fff;
}

.create-req-textarea:focus {
    border-color: #c4a882;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(196, 168, 130, 0.08);
}

.create-req-textarea::placeholder {
    color: #bbb;
}

.create-req-datetime {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23b0b8c8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='16' y1='2' x2='16' y2='6'%3E%3C/line%3E%3Cline x1='8' y1='2' x2='8' y2='6'%3E%3C/line%3E%3Cline x1='3' y1='10' x2='21' y2='10'%3E%3C/line%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px;
}

/* 下拉选择框 */
.create-req-select-wrap {
    position: relative;
}

.create-req-select {
    width: 100%;
    padding: 12px 40px 12px 16px;
    border: 2px solid #e8eaed;
    border-radius: 10px;
    font-size: 0.95rem;
    outline: none;
    box-sizing: border-box;
    transition: all 0.25s;
    background: #fafbfc;
    color: #333;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.create-req-select:hover {
    border-color: #d0d5dd;
    background: #fff;
}

.create-req-select:focus {
    border-color: #c4a882;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(196, 168, 130, 0.08);
}

.create-req-select-arrow {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #bbb;
    pointer-events: none;
    transition: color 0.2s;
}

.create-req-select:focus + .create-req-select-arrow {
    color: #c4a882;
}

.create-req-select option {
    color: #333;
    background: #fff;
    padding: 8px;
}

/* 双列行 */
.create-req-row {
    display: flex;
    gap: 18px;
}

.create-req-half {
    flex: 1;
    min-width: 0;
}

/* 底部操作栏 */
.create-req-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 28px 20px;
    border-top: 1px solid #f0f1f3;
    flex-shrink: 0;
}

.create-req-btn-cancel {
    padding: 10px 24px;
    border: 2px solid #e8eaed;
    border-radius: 10px;
    background: #fff;
    color: #666;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.create-req-btn-cancel:hover {
    background: #f8f9fa;
    border-color: #d0d5dd;
}

.create-req-btn-confirm {
    padding: 10px 28px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #c4a882 0%, #a89070 100%);
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.25s;
    box-shadow: 0 2px 8px rgba(196, 168, 130, 0.3);
}

.create-req-btn-confirm:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(196, 168, 130, 0.4);
}

.create-req-btn-confirm:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* 图片放大弹窗 */
.image-zoom-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 3000;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.image-zoom-overlay.show {
    display: flex;
}

.image-zoom-overlay img {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 8px;
}

.image-zoom-video-wrap {
    position: relative;
    display: inline-block;
}

/* 放大弹窗下载按钮 */
.image-zoom-download {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 3010;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.5);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    padding: 0;
}
.image-zoom-download:hover {
    background: rgba(255, 255, 255, 0.35);
    border-color: rgba(255, 255, 255, 0.8);
    transform: scale(1.1);
}

/* 右键阻止遮罩层（覆盖在 video 上拦截右键菜单） */
.image-zoom-context-block {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 5;
    background: transparent;
    cursor: default;
}

/* 响应式 */
@media (max-width: 1024px) {
    .main-layout {
        grid-template-columns: 1fr;
        height: auto;
        min-height: auto;
    }

    .req-sidebar {
        max-height: 40vh;
    }

    .chat-card {
        max-height: 60vh;
    }
}

/* 手机端创建需求弹窗 */
@media (max-width: 640px) {
    .create-req-modal {
        max-width: 95vw;
        max-height: 85vh;
        border-radius: 16px;
    }

    .create-req-header {
        padding: 18px 16px 14px;
    }

    .create-req-header-title {
        font-size: 1rem;
    }

    .create-req-header-subtitle {
        font-size: 0.72rem;
    }

    .req-modal-scroll {
        padding: 16px;
    }

    .create-req-row {
        flex-direction: column;
        gap: 0;
    }

    .create-req-half {
        width: 100%;
    }

    .create-req-field-group {
        margin-bottom: 16px;
    }

    .create-req-footer {
        padding: 12px 16px 16px;
        gap: 8px;
    }

    .create-req-btn-cancel {
        padding: 8px 16px;
        font-size: 0.82rem;
    }

    .create-req-btn-confirm {
        padding: 8px 20px;
        font-size: 0.82rem;
    }
}

/* ==================== 支付弹窗 ==================== */
.payment-modal {
    max-width: 560px;
}

/* 减小弹窗基础内边距 */
.payment-modal.modal {
    padding: 24px;
}

.payment-modal .modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.payment-modal .modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.2s;
}

.payment-modal .modal-close:hover {
    color: #333;
}

.payment-info {
    margin-bottom: 14px;
}

.payment-req-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 12px;
    padding: 10px 14px;
    background: #f8f9fc;
    border-radius: 10px;
    border-left: 4px solid #c4a882;
}

/* 核心支付信息 - 双列布局 */
.payment-summary-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 10px;
}

.payment-summary-card {
    background: #f8f9fc;
    border-radius: 10px;
    padding: 12px 14px;
    text-align: center;
    transition: box-shadow 0.2s;
}

.payment-summary-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.payment-summary-card .payment-label {
    font-size: 0.78rem;
    color: #999;
    margin-bottom: 4px;
}

.payment-summary-card .payment-value {
    font-size: 1.25rem;
    font-weight: 700;
}

.payment-summary-card.price-card .payment-value {
    color: #e74c3c;
}

.payment-summary-card.credits-card .payment-value {
    color: #e67e22;
}

/* 兑换信息条 */
.payment-convert-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 6px 0;
    margin-bottom: 8px;
    color: #aaa;
    font-size: 0.8rem;
}

.payment-convert-bar .payment-convert-dot {
    width: 4px;
    height: 4px;
    background: #ccc;
    border-radius: 50%;
}

.payment-convert-bar .payment-convert {
    color: #c4a882;
    font-weight: 600;
}

/* 剩余积分行 */
.payment-remaining-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 14px;
    background: #f0faf4;
    border-radius: 8px;
    margin-bottom: 8px;
}

.payment-remaining-row .payment-label {
    font-size: 0.82rem;
    color: #888;
}

.payment-remaining {
    font-size: 0.95rem;
    font-weight: 700;
    color: #27ae60;
}

.payment-remaining.payment-insufficient {
    color: #e74c3c;
    animation: pulse 1s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* 退款提示 */
.payment-tip {
    padding: 8px 14px;
    background: #e8f4fd;
    border: 1px solid #b8d8f0;
    border-radius: 8px;
    font-size: 0.84rem;
    color: #2c6e9c;
    text-align: center;
    line-height: 1.4;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-bottom: 14px;
}

.payment-tip::before {
    content: '💡';
    font-size: 1rem;
}

/* 减小操作按钮区域间距 */
.payment-modal .modal-actions {
    margin-top: 16px;
}

/* 删除旧的分隔线 */
.payment-divider {
    display: none;
}

/* 积分不足提示 */
.payment-insufficient-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: #fff8e1;
    border: 1px solid #ffe082;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 4px;
    gap: 8px;
}

.payment-insufficient-icon {
    font-size: 1.5rem;
}

.payment-insufficient-text {
    font-size: 0.82rem;
    color: #e65100;
    line-height: 1.5;
}

.payment-insufficient-link {
    display: inline-block;
    padding: 8px 20px;
    background: linear-gradient(135deg, #c4a882 0%, #a89070 100%);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.payment-insufficient-link:hover {
    box-shadow: 0 4px 14px rgba(196, 168, 130, 0.4);
    transform: translateY(-1px);
}

/* ========== 充值支付独立弹窗（与积分充值页面一致） ========== */
.paying-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.paying-dialog {
    background: #fff;
    border-radius: 16px;
    padding: 40px;
    text-align: center;
    max-width: 360px;
    width: 90%;
}

.paying-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #f0f0f0;
    border-top-color: #c4a882;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.paying-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.paying-desc {
    font-size: 13px;
    color: #999;
}

/* 支付确认按钮 */
.payment-confirm-btn {
    background: linear-gradient(135deg, #e67e22 0%, #f39c12 100%) !important;
}

.payment-confirm-btn:hover {
    background: linear-gradient(135deg, #d35400 0%, #e67e22 100%) !important;
    box-shadow: 0 4px 14px rgba(230, 126, 34, 0.4);
}

.payment-confirm-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* 支付错误 */
.payment-error {
    background: #fdecea;
    color: #c0392b;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.82rem;
    margin-top: 12px;
}

/* 支付成功弹窗 */
.payment-success-icon {
    font-size: 3rem;
    margin-bottom: 12px;
}

.payment-success-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #27ae60;
    margin-bottom: 8px;
}

.payment-success-detail {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.6;
}

/* ========== 样稿确认弹窗 ========== */
.confirm-sample-modal {
    max-width: 440px;
    padding: 36px 32px 28px;
    text-align: center;
}

.confirm-sample-icon {
    font-size: 3.5rem;
    margin-bottom: 12px;
    animation: confirmBounce 0.6s ease;
}

@keyframes confirmBounce {
    0% { transform: scale(0.5); opacity: 0; }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); opacity: 1; }
}

.confirm-sample-modal .modal-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 8px;
}

.confirm-sample-modal .modal-message {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.6;
}

.confirm-sample-warning {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    margin: 12px 0 8px;
    background: linear-gradient(135deg, #fff8e1 0%, #fff3cd 100%);
    border: 1px solid #f9e79f;
    border-radius: 10px;
    font-size: 0.82rem;
    color: #856404;
    font-weight: 500;
}

.confirm-sample-warning svg {
    flex-shrink: 0;
    color: #f39c12;
}

.confirm-sample-modal .modal-actions {
    justify-content: center;
    gap: 14px;
    margin-top: 20px;
}

.confirm-sample-modal .modal-btn-cancel {
    padding: 10px 28px;
    background: #f5f6f8;
    color: #666;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s;
}

.confirm-sample-modal .modal-btn-cancel:hover {
    background: #e9ecef;
    color: #444;
}

.confirm-sample-btn {
    padding: 10px 28px;
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s;
    box-shadow: 0 2px 8px rgba(39, 174, 96, 0.25);
}

.confirm-sample-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(39, 174, 96, 0.4);
}

.confirm-sample-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 结果弹窗 */
.confirm-result-modal {
    max-width: 400px;
    padding: 36px 32px 28px;
    text-align: center;
}

.confirm-result-icon {
    font-size: 3.5rem;
    margin-bottom: 12px;
}

.confirm-result-modal .modal-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 8px;
}

.confirm-result-modal .modal-message {
    font-size: 0.92rem;
    color: #555;
    line-height: 1.6;
}

.confirm-result-modal .modal-btn-confirm {
    padding: 10px 36px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    font-weight: 600;
}

.confirm-result-modal .modal-btn-confirm:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(102, 126, 234, 0.4);
}
