/* 创建活动 v4 — 新排版样式 */
/* Step1 选择方式 */
.cv4-ways {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin: 24px 0 32px;
}
.cv4-way-card {
    background: #fff;
    border: 0.5px solid #e8eaee;
    border-radius: 16px;
    padding: 28px 24px 24px;
    cursor: pointer;
    transition: all 0.25s;
    position: relative;
    overflow: hidden;
}
.cv4-way-card:hover {
    border-color: #F18D24;
    box-shadow: 0 4px 20px rgba(241,141,36,0.1);
    transform: translateY(-2px);
}
.cv4-way-card.featured {
    border: 1.5px solid #F18D24;
    background: linear-gradient(180deg, #fffaf2 0%, #fff 100%);
}
.cv4-way-card .badge {
    position: absolute; top: 12px; right: 12px;
    font-size: 10px; padding: 2px 10px; border-radius: 20px; font-weight: 500;
}
.cv4-way-card .badge.recommend { background: #F18D24; color: #fff; }
.cv4-way-card .badge.free { background: #f7f8fa; color: #6b7280; }
.cv4-way-card .icon { font-size: 32px; margin-bottom: 12px; }
.cv4-way-card h3 { font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.cv4-way-card .desc { font-size: 13px; color: #6b7280; line-height: 1.6; }
.cv4-way-card .features { margin-top: 14px; display: flex; flex-direction: column; gap: 6px; }
.cv4-way-card .features .feat {
    font-size: 12px; color: #6b7280; display: flex; align-items: center; gap: 6px;
}
.cv4-way-card .features .feat .dot { width: 4px; height: 4px; border-radius: 50%; background: #d0d4dd; flex-shrink: 0; }
.cv4-way-card .features .feat.good { color: #34d399; }
.cv4-way-card .features .feat.good .dot { background: #34d399; }

/* Step2a 左右分栏 */
.cv4-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    min-height: calc(100vh - 140px);
}
@media (max-width: 900px) {
    .cv4-split { grid-template-columns: 1fr; }
}
/* 左侧对话面板 */
.cv4-chat-panel {
    background: #fff;
    border-radius: 16px;
    border: 0.5px solid #e8eaee;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 160px);
    position: sticky;
    top: 88px;
}
.cv4-chat-header {
    padding: 20px 24px 16px;
    border-bottom: 0.5px solid #e8eaee;
}
.cv4-chat-header h2 { font-size: 15px; font-weight: 500; display: flex; align-items: center; gap: 8px; }
.cv4-chat-header p { font-size: 13px; color: #6b7280; margin-top: 4px; }
.cv4-chat-header .model-badge {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 11px; padding: 2px 10px;
    background: #fff7e6; color: #F18D24;
    border-radius: 20px; margin-top: 8px; font-weight: 500;
}
.cv4-chat-msgs {
    flex: 1; overflow-y: auto;
    padding: 16px 24px;
    display: flex; flex-direction: column; gap: 12px;
}
.cv4-msg {
    display: flex; gap: 10px; max-width: 92%;
    animation: cv4MsgIn 0.3s ease;
}
@keyframes cv4MsgIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
.cv4-msg.user { align-self: flex-end; flex-direction: row-reverse; }
.cv4-msg .avatar {
    width: 32px; height: 32px; min-width: 32px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px;
}
.cv4-msg.ai .avatar { background: #f0f4ff; color: #3b82f6; border: 0.5px solid #dbeafe; }
.cv4-msg.user .avatar { background: #F18D24; color: #fff; }
.cv4-msg .bubble {
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 13.5px;
    line-height: 1.7;
}
.cv4-msg.ai .bubble {
    background: #fff;
    border: 0.5px solid #e8eaee;
    border-bottom-left-radius: 4px;
    color: #1a1d29;
}
.cv4-msg.user .bubble {
    background: #F18D24;
    color: #fff;
    border-bottom-right-radius: 4px;
}
.cv4-msg .bubble .section-outline {
    margin-top: 8px; padding: 10px 12px;
    background: #fafbfc;
    border: 0.5px solid #e8eaee;
    border-radius: 8px;
}
.cv4-keywords {
    display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px;
}
.cv4-keywords .kw {
    padding: 3px 10px;
    background: #fff7e6; color: #d9781a;
    border-radius: 20px; font-size: 11px; font-weight: 500;
}
.cv4-chat-input {
    padding: 16px 24px 20px;
    border-top: 0.5px solid #e8eaee;
    display: flex; gap: 8px; align-items: flex-end;
}
.cv4-chat-input .input-wrap {
    flex: 1;
    background: #f7f8fa;
    border: 0.5px solid #e8eaee;
    border-radius: 12px;
    padding: 8px 14px;
    transition: border-color 0.2s;
}
.cv4-chat-input .input-wrap:focus-within { border-color: #F18D24; }
.cv4-chat-input textarea {
    width: 100%; border: none; background: transparent; outline: none;
    font-size: 13.5px; line-height: 1.6; resize: none;
    min-height: 24px; max-height: 80px; font-family: inherit;
}
.cv4-chat-input .btn-send {
    width: 40px; height: 40px;
    background: #F18D24; color: #fff;
    border: none; border-radius: 8px;
    cursor: pointer; display: flex;
    align-items: center; justify-content: center;
    flex-shrink: 0;
    transition: background 0.2s;
}
.cv4-chat-input .btn-send:hover { background: #d9781a; }

/* 右侧表单面板 */
.cv4-form-panel {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.cv4-card {
    background: #fff;
    border-radius: 12px;
    border: 0.5px solid #e8eaee;
    padding: 20px 24px;
}
.cv4-card .card-title {
    font-size: 13px; font-weight: 500;
    color: #6b7280;
    margin-bottom: 14px;
    display: flex; align-items: center; gap: 6px;
    text-transform: uppercase; letter-spacing: 0.3px;
}
.cv4-card .card-title .badge {
    font-size: 10px; padding: 1px 8px; border-radius: 10px;
    background: #fff7e6; color: #F18D24;
    font-weight: 500; letter-spacing: 0; text-transform: none;
}
.cv4-row {
    display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px;
}
.cv4-row.three { grid-template-columns: 1fr 1fr 1fr; }
.cv4-row.full { grid-template-columns: 1fr; }
.cv4-field { }
.cv4-field label {
    display: block; font-size: 12px; color: #6b7280; margin-bottom: 4px; font-weight: 500;
}
.cv4-field input, .cv4-field select {
    width: 100%; padding: 8px 12px;
    border: 0.5px solid #e8eaee; border-radius: 8px;
    font-size: 13px; color: #1a1d29;
    background: #fff;
    transition: border-color 0.2s; font-family: inherit;
}
.cv4-field input:focus, .cv4-field select:focus {
    outline: none; border-color: #F18D24;
    box-shadow: 0 0 0 3px rgba(241,141,36,0.08);
}
.cv4-field input.ai-filled {
    background: #fafff5;
    border-color: #b7eb8f;
}
.cv4-field input::placeholder { color: #9ca3af; }

/* 板块大纲折叠 */
.cv4-sos {
    display: flex; flex-direction: column; gap: 8px;
}
.cv4-so-item {
    border: 0.5px solid #e8eaee;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.2s;
}
.cv4-so-item:hover { border-color: #d0d4dd; }
.cv4-so-item .so-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 14px; cursor: pointer; -webkit-user-select: none; user-select: none;
}
.cv4-so-item .so-header .so-left {
    display: flex; align-items: center; gap: 8px;
}
.cv4-so-item .so-header .so-left .so-icon {
    width: 28px; height: 28px; border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px;
}
.cv4-so-item .so-header .so-left .so-name { font-size: 13px; font-weight: 500; }
.cv4-so-item .so-header .so-left .so-desc { font-size: 12px; color: #9ca3af; }
.cv4-so-item .so-header .so-status {
    display: flex; align-items: center; gap: 4px;
    font-size: 11px; color: #9ca3af;
}
.cv4-so-item .so-header .so-status.filled { color: #34d399; }
.cv4-so-item .so-body { padding: 0 14px 12px; display: none; }
.cv4-so-item .so-body.open { display: block; }
.cv4-so-item .so-body textarea {
    width: 100%; padding: 8px 12px;
    border: 0.5px solid #e8eaee; border-radius: 8px;
    font-size: 12.5px; line-height: 1.6;
    resize: vertical; min-height: 60px;
    font-family: inherit;
    transition: border-color 0.2s;
}
.cv4-so-item .so-body textarea:focus { outline: none; border-color: #F18D24; }

/* 动作按钮 */
.cv4-actions {
    display: flex; justify-content: flex-end; gap: 10px; padding-top: 4px;
}
.cv4-actions .btn {
    padding: 9px 24px; border-radius: 8px;
    font-size: 13px; font-weight: 500; cursor: pointer;
    font-family: inherit; transition: all 0.2s;
    display: flex; align-items: center; gap: 6px;
}
.cv4-actions .btn-primary {
    background: #F18D24; color: #fff; border: none;
}
.cv4-actions .btn-primary:hover { background: #d9781a; }
.cv4-actions .btn-primary:disabled { background: #d9d9d9; cursor: not-allowed; }
.cv4-actions .btn-outline {
    background: transparent; color: #6b7280;
    border: 0.5px solid #e8eaee;
}
.cv4-actions .btn-outline:hover { border-color: #9ca3af; color: #1a1d29; }

/* 打字动画 */
.cv4-typing {
    display: flex; gap: 3px; padding: 4px 0;
}
.cv4-typing span {
    width: 5px; height: 5px;
    border-radius: 50%;
    background: #c4c9d4;
    animation: cv4T 1.4s infinite;
}
.cv4-typing span:nth-child(2) { animation-delay: 0.2s; }
.cv4-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes cv4T {
    0%, 60%, 100% { opacity: 0.2; transform: translateY(0); }
    30% { opacity: 1; transform: translateY(-3px); }
}

/* AI 回复气泡下方的操作按钮组（关键桥梁） */
.cv4-msg-actions {
    display: flex;
    gap: 6px;
    margin-top: 8px;
    margin-left: 36px;   /* 对齐气泡左边 */
    flex-wrap: wrap;
}
.cv4-act-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border: 1px solid #e0e3e8;
    background: #fff;
    border-radius: 14px;
    font-size: 12px;
    color: #5a6072;
    cursor: pointer;
    transition: all .15s;
}
.cv4-act-btn:hover {
    border-color: #F18D24;
    color: #F18D24;
    background: #fffaf2;
}
.cv4-act-btn.primary {
    background: linear-gradient(135deg, #F18D24, #ff7e3a);
    color: #fff;
    border-color: transparent;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(241,141,36,0.25);
}
.cv4-act-btn.primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(241,141,36,0.35);
    color: #fff;
    background: linear-gradient(135deg, #F18D24, #ff7e3a);
}
.cv4-act-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* 板块大纲卡标题旁的"一键套用"按钮 */
.cv4-apply-latest {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 12px;
    border: 0;
    background: linear-gradient(135deg, #F18D24, #ff7e3a);
    color: #fff;
    border-radius: 14px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(241,141,36,0.25);
    transition: all .15s;
    animation: cv4Glow 2s ease-in-out infinite;
}
.cv4-apply-latest:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(241,141,36,0.4);
}
@keyframes cv4Glow {
    0%, 100% { box-shadow: 0 2px 6px rgba(241,141,36,0.25); }
    50% { box-shadow: 0 2px 12px rgba(241,141,36,0.5); }
}

/* 板块填充后高亮闪烁 */
.cv4-so-item.cv4-flash {
    animation: cv4Flash 1.5s ease;
}
@keyframes cv4Flash {
    0% { background: #fff; }
    20% { background: #fff7e6; box-shadow: 0 0 0 2px #F18D24 inset; }
    100% { background: #fff; box-shadow: none; }
}

/* 板块 header 右侧操作区（状态 + 润色按钮） */
.so-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.cv4-so-polish {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    border: 1px solid #F18D24;
    background: #fffaf2;
    border-radius: 14px;
    font-size: 12px;
    font-weight: 500;
    color: #F18D24;
    cursor: pointer;
    transition: all .15s;
    white-space: nowrap;
}
.cv4-so-polish:hover {
    background: linear-gradient(135deg, #F18D24, #ff7e3a);
    color: #fff;
    box-shadow: 0 2px 8px rgba(241,141,36,0.3);
}
.cv4-so-polish:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}
