文件
OmniCard/mpuniapp/pages/owner/leads-detail.uvue

1106 行
28 KiB
Plaintext

<template>
<view class="lead-detail-page" :class="pageRtlClass" :style="pageTheme">
<view class="lead-detail-container">
<view v-if="state.missingId || state.empty" class="lead-empty">
<text class="lead-empty-text">{{ emptyMessage }}</text>
<button class="primary-cta-btn" @click="handleBack">
<text class="primary-cta-btn-text">{{ backLabel }}</text>
</button>
</view>
<view v-else-if="state.loading" class="lead-skeleton">
<view class="skeleton-line skeleton-title"></view>
<view class="skeleton-card"></view>
<view class="skeleton-card"></view>
</view>
<view v-else class="lead-body">
<!-- 1. Lead Profile Bento Card -->
<view class="lead-card lead-profile">
<view class="profile-hero-row">
<view class="lead-avatar-wrap">
<text class="lead-avatar-text">{{ leadInitial }}</text>
</view>
<view class="lead-main-info">
<text class="lead-name">{{ state.name }}</text>
<text v-if="state.company !== ''" class="lead-company">{{ state.company }}</text>
</view>
<view class="lead-badge-col">
<view class="lead-score-pill">
<text class="lead-score-text">{{ scoreLabel }} {{ state.intentScore }}</text>
</view>
<view class="lead-status-pill" :class="{ 'lead-status-hot-pill': isHotStatus }">
<text class="lead-status" :class="{ 'lead-status-hot': isHotStatus }">{{ statusText }}</text>
</view>
</view>
</view>
<!-- Modern Global Outreach Action Pills -->
<view v-if="hasOutreachOptions" class="lead-outreach-row">
<view v-if="phoneText !== ''" class="outreach-pill" @click="handleCallPhone">
<text class="outreach-pill-text">{{ phoneLabel }}: {{ phoneText }}</text>
</view>
<view v-if="hasWhatsApp" class="outreach-pill whatsapp-pill" @click="handleWhatsApp">
<text class="outreach-pill-text whatsapp-text">{{ whatsappLabel }}</text>
</view>
<view v-if="emailText !== ''" class="outreach-pill" @click="handleCopyEmail">
<text class="outreach-pill-text">{{ emailLabel }}: {{ emailText }}</text>
</view>
<view class="outreach-pill contact-pill" @click="handleSaveContact">
<text class="outreach-pill-text contact-text">{{ saveContactLabel }}</text>
</view>
<view v-if="sourceText !== ''" class="source-tag">
<text class="source-tag-text">{{ sourceTitleLabel }}: {{ sourceText }}</text>
</view>
</view>
</view>
<!-- 2. Commercial Stage Advancement Bento Card -->
<view class="lead-card stage-card">
<view class="card-header-row">
<text class="section-title">{{ stageTitleLabel }}</text>
</view>
<view class="stage-stepper">
<view
class="stage-pill"
:class="{ 'stage-pill-active': state.status === 'new' }"
@click="handleStageChange('new')"
>
<text class="stage-pill-text">{{ statusLabelOf('new') }}</text>
</view>
<view
class="stage-pill"
:class="{ 'stage-pill-active': state.status === 'contacted' }"
@click="handleStageChange('contacted')"
>
<text class="stage-pill-text">{{ statusLabelOf('contacted') }}</text>
</view>
<view
class="stage-pill"
:class="{ 'stage-pill-active': state.status === 'hot' }"
@click="handleStageChange('hot')"
>
<text class="stage-pill-text">{{ statusLabelOf('hot') }}</text>
</view>
<view
class="stage-pill"
:class="{ 'stage-pill-active': state.status === 'won' }"
@click="handleStageChange('won')"
>
<text class="stage-pill-text">{{ statusLabelOf('won') }}</text>
</view>
<view
class="stage-pill"
:class="{ 'stage-pill-active': state.status === 'archived' }"
@click="handleStageChange('archived')"
>
<text class="stage-pill-text">{{ statusLabelOf('archived') }}</text>
</view>
</view>
</view>
<!-- 3. Visitor Radar Footprint Timeline Bento Card -->
<view class="lead-card lead-section">
<view class="card-header-row">
<text class="section-title">{{ timelineLabel }}</text>
<view class="count-badge">
<text class="count-badge-text">{{ tracksCountText }}</text>
</view>
</view>
<list-view class="timeline" :scroll-y="true">
<list-item v-if="filteredTracks.length === 0">
<view class="timeline-empty">
<text class="timeline-empty-text">{{ t('empty') }}</text>
</view>
</list-item>
<list-item
v-for="item in filteredTracks"
:key="item.id"
>
<view class="timeline-item">
<view class="timeline-header-line">
<text class="timeline-place">{{ formatPlace(item.country, item.city) }}</text>
<view class="timeline-touch-wrap">
<text class="timeline-touch">{{ item.touchType }}</text>
</view>
</view>
<view class="timeline-metrics">
<text class="timeline-metric">{{ t('stay') }} {{ formatStayMs(item.stayDurationMs) }}</text>
<text class="timeline-metric">{{ t('depth') }} {{ formatDepthPct(item.scrollDepth) }}</text>
</view>
</view>
</list-item>
</list-view>
</view>
<!-- 4. AI Copilot Script Bento Card -->
<view class="lead-card lead-section ai-card">
<view class="ai-header-row">
<view class="ai-pulse-dot"></view>
<text class="ai-badge-text">AI Copilot</text>
</view>
<text class="ai-script">{{ t('aiScript') }}</text>
<view v-if="state.aiScript !== ''" class="ai-result-box">
<text class="ai-result-text">{{ state.aiScript }}</text>
<view class="ai-result-actions">
<view class="ai-copy-btn" @click="handleCopyScript">
<text class="ai-copy-btn-text">{{ copyScriptLabel }}</text>
</view>
</view>
</view>
<view class="ai-footer-row">
<button
class="ai-gen-btn"
:class="{ 'ai-gen-btn-loading': state.aiGenerating }"
:disabled="state.aiGenerating"
@click="handleGenerateAiScript"
>
<text class="ai-gen-btn-text">{{ generateAiLabel }}</text>
</button>
</view>
</view>
<!-- 5. Follow-up Notes & Evidence Bento Card -->
<view class="lead-card lead-section notes-section">
<view class="card-header-row">
<text class="section-title">{{ notesLabel }}</text>
</view>
<view v-if="state.existingNotes !== ''" class="notes-history-box">
<text class="notes-history-label">{{ historyLabel }}</text>
<text class="existing-notes">{{ state.existingNotes }}</text>
</view>
<view class="notes-compose-box">
<textarea
class="notes-input"
v-model="state.nextNote"
:placeholder="notesPlaceholder"
:disabled="state.saving"
/>
</view>
<view class="notes-attach-box">
<text class="upload-hint">{{ t('uploadHint') }}</text>
<view class="notes-attachments">
<image-uploader
v-model="state.attachments"
:multiple="true"
:maxCount="6"
:disabled="state.saving"
/>
</view>
</view>
</view>
<view v-if="state.errorMessage !== ''" class="lead-error">
<text class="lead-error-text">{{ state.errorMessage }}</text>
</view>
</view>
</view>
<!-- 6. Floating Primary CTA Bar (Mobile Safe Area) -->
<view v-if="!(state.missingId || state.empty || state.loading)" class="lead-cta-bar">
<view class="lead-cta-inner">
<button
class="primary-cta-btn"
:class="{ 'primary-cta-btn-disabled': state.saving }"
:disabled="state.saving"
@click="handleSave"
>
<text class="primary-cta-btn-text">{{ saveLabel }}</text>
</button>
</view>
</view>
</view>
</template>
<script setup lang="uts">
import { getCurrentLocale, getOmniText, isRtl } from '../../common/locale.uts';
import { utsLightColors, utsRadius, utsSpacing, utsTypography } from '../../common/tokens.uts';
import {
applyLeadDetailOptions,
createLeadDetailState,
formatTrackDepth,
formatTrackPlace,
formatTrackStay,
formatWhatsAppUrl,
generateAiIcebreaker,
goBackFromLeadDetail,
refreshLeadDetail,
resolveLeadDetailText,
saveContactToDevice,
statusLabelOf,
submitLeadNote,
updateLeadStage,
LeadDetailCopyKey,
LeadDetailPageOptions,
} from './useLeadDetail.uts';
import { parseLeadStatus } from './useLeads.uts';
import { RadarTrack } from '../../common/types.uts';
import ImageUploader from '../../components/image-uploader/image-uploader.uvue';
const pageTheme: Record<string, string> = {
'--oc-primary': utsLightColors.primary,
'--oc-primary-gradient': utsLightColors.primaryGradient,
'--oc-primary-soft': utsLightColors.primarySoft,
'--oc-aurora': utsLightColors.aurora,
'--oc-bg': utsLightColors.bg,
'--oc-surface': utsLightColors.surface,
'--oc-border': utsLightColors.border,
'--oc-text': utsLightColors.text,
'--oc-text-2': utsLightColors.text2,
'--oc-success': utsLightColors.success,
'--oc-warning': utsLightColors.warning,
'--oc-error': utsLightColors.error,
'--oc-radius-btn': utsRadius.button,
'--oc-radius-card': utsRadius.card,
'--oc-radius-modal': utsRadius.modal,
'--oc-radius-pill': utsRadius.pill,
'--oc-shadow-card': utsTypography.shadowCard,
'--oc-shadow-cta': utsTypography.shadowCta,
'--oc-shadow': utsTypography.shadow,
'--oc-space-8': utsSpacing.space8,
'--oc-space-12': utsSpacing.space12,
'--oc-space-16': utsSpacing.space16,
'--oc-space-24': utsSpacing.space24,
};
const state = reactive(createLeadDetailState());
const scoreLabel = ref(getOmniText(getCurrentLocale(), 'radar.lead_score'));
const timelineLabel = ref(getOmniText(getCurrentLocale(), 'radar.visitor_trace'));
const notesLabel = ref(getOmniText(getCurrentLocale(), 'crm.follow_up'));
const notesPlaceholder = ref(resolveLeadDetailText('notesPlaceholder'));
const backLabel = ref(resolveLeadDetailText('back'));
const stageTitleLabel = ref(resolveLeadDetailText('stageTitle'));
const historyLabel = ref(resolveLeadDetailText('historyTitle'));
const sourceTitleLabel = ref(resolveLeadDetailText('sourceLabel'));
const phoneLabel = ref(getOmniText(getCurrentLocale(), 'portal.phone'));
const emailLabel = ref(getOmniText(getCurrentLocale(), 'portal.email'));
const whatsappLabel = ref(resolveLeadDetailText('whatsappAction'));
const saveContactLabel = ref(resolveLeadDetailText('saveContactAction'));
const generateAiLabel = ref(resolveLeadDetailText('generateAiAction'));
const copyScriptLabel = ref(resolveLeadDetailText('copyScriptAction'));
const pageRtlClass = computed((): string => {
return isRtl(getCurrentLocale()) ? 'lead-rtl' : '';
});
const emptyMessage = computed((): string => {
if (state.missingId) {
return resolveLeadDetailText('missingId');
}
if (state.errorMessage !== '') {
return state.errorMessage;
}
return resolveLeadDetailText('empty');
});
const statusText = computed((): string => {
return statusLabelOf(state.status);
});
const isHotStatus = computed((): boolean => {
return state.status === 'hot';
});
const leadInitial = computed((): string => {
const n = state.name.trim();
return n.length > 0 ? n.charAt(0).toUpperCase() : 'L';
});
const sourceText = computed((): string => {
const lead = state.lead;
if (lead == null || lead.source == null) {
return '';
}
return String(lead.source).toUpperCase();
});
const tracksCountText = computed((): string => {
return `${state.tracks.length}`;
});
const phoneText = computed((): string => {
const lead = state.lead;
if (lead == null) {
return '';
}
const phone = lead.phone;
if (phone == null) {
return '';
}
return phone.trim();
});
const emailText = computed((): string => {
const lead = state.lead;
if (lead == null) {
return '';
}
const email = lead.email;
if (email == null) {
return '';
}
return email.trim();
});
const hasWhatsApp = computed((): boolean => {
return phoneText.value !== '';
});
const hasOutreachOptions = computed((): boolean => {
return phoneText.value !== '' || emailText.value !== '' || sourceText.value !== '';
});
const filteredTracks = computed((): RadarTrack[] => {
if (state.tracks.length <= 1) {
return state.tracks;
}
const meaningful = state.tracks.filter((t: RadarTrack): boolean => {
return t.stayDurationMs > 0 || t.scrollDepth > 0;
});
return meaningful.length > 0 ? meaningful : state.tracks.slice(0, 3);
});
const saveLabel = computed((): string => {
if (state.saving) {
return resolveLeadDetailText('loading');
}
return resolveLeadDetailText('save');
});
function t(key: LeadDetailCopyKey): string {
return resolveLeadDetailText(key);
}
function formatPlace(country?: string, city?: string): string {
return formatTrackPlace(country, city);
}
function formatStayMs(ms: number): string {
return formatTrackStay(ms);
}
function formatDepthPct(depth: number): string {
return formatTrackDepth(depth);
}
function handleBack(): void {
goBackFromLeadDetail();
}
function handleCallPhone(): void {
if (phoneText.value !== '') {
uni.makePhoneCall({
phoneNumber: phoneText.value,
});
}
}
function handleWhatsApp(): void {
const url = formatWhatsAppUrl(phoneText.value);
if (url === '') {
return;
}
// #ifdef H5
if (typeof window !== 'undefined') {
window.open(url, '_blank');
return;
}
// #endif
uni.setClipboardData({
data: url,
success: () => {
uni.showToast({
title: resolveLeadDetailText('copiedToast'),
icon: 'none',
});
},
});
}
function handleCopyEmail(): void {
if (emailText.value !== '') {
uni.setClipboardData({
data: emailText.value,
success: () => {
uni.showToast({
title: resolveLeadDetailText('copiedToast'),
icon: 'none',
});
},
});
}
}
function handleSaveContact(): void {
saveContactToDevice(state.lead);
}
function handleGenerateAiScript(): void {
if (state.aiGenerating) {
return;
}
state.aiGenerating = true;
setTimeout(() => {
state.aiScript = generateAiIcebreaker(state.lead, state.tracks, getCurrentLocale());
state.aiGenerating = false;
}, 200);
}
function handleCopyScript(): void {
if (state.aiScript !== '') {
uni.setClipboardData({
data: state.aiScript,
success: () => {
uni.showToast({
title: resolveLeadDetailText('scriptCopiedToast'),
icon: 'none',
});
},
});
}
}
async function handleStageChange(newStage: string): Promise<void> {
const status = parseLeadStatus(newStage);
if (status == null || state.leadId == null || state.status === status) {
return;
}
const ok = await updateLeadStage(state, status);
if (ok) {
uni.showToast({
title: resolveLeadDetailText('stageUpdated'),
icon: 'none',
});
}
}
async function handleSave(): Promise<void> {
const next = state.nextNote.trim();
if (next === '' && state.attachments.length === 0) {
uni.showToast({
title: resolveLeadDetailText('notesPlaceholder'),
icon: 'none',
});
return;
}
const ok = await submitLeadNote(state);
if (ok) {
uni.showToast({
title: getOmniText(getCurrentLocale(), 'common.save'),
icon: 'none',
});
}
}
onLoad((options: LeadDetailPageOptions) => {
const ready = applyLeadDetailOptions(state, options);
if (ready) {
refreshLeadDetail(state);
}
});
</script>
<style scoped>
.lead-detail-page {
display: flex;
flex-direction: column;
min-height: 100vh;
box-sizing: border-box;
background-color: var(--oc-bg, #F7F8FA);
}
.lead-detail-container {
width: 100%;
max-width: 480px;
margin: 0 auto;
display: flex;
flex-direction: column;
box-sizing: border-box;
}
.lead-rtl {
direction: rtl;
}
.lead-empty {
flex: 1;
margin-inline: var(--oc-space-16, 16px);
margin-block: 40px;
padding: var(--oc-space-24, 24px);
background-color: var(--oc-surface, #FFFFFF);
border: 1px solid var(--oc-border, #EBF1F7);
border-radius: var(--oc-radius-card, 20px);
box-shadow: var(--oc-shadow-card, 0 8px 30px rgba(0, 0, 0, 0.04));
display: flex;
flex-direction: column;
align-items: center;
}
.lead-empty-text {
font-size: 16px;
font-weight: 600;
color: var(--oc-text, #101828);
text-align: center;
line-height: 1.6;
margin-block-end: var(--oc-space-24, 24px);
}
.lead-skeleton {
flex: 1;
padding-inline: var(--oc-space-16, 16px);
padding-block: var(--oc-space-16, 16px);
}
.skeleton-line {
height: 16px;
width: 40%;
background-color: var(--oc-border, #EBF1F7);
border-radius: 8px;
margin-block-end: var(--oc-space-12, 12px);
}
.skeleton-title {
width: 56%;
height: 24px;
}
.skeleton-card {
height: 72px;
background-color: var(--oc-border, #EBF1F7);
border-radius: var(--oc-radius-card, 20px);
margin-block-end: var(--oc-space-12, 12px);
}
.lead-body {
display: flex;
flex-direction: column;
flex: 1;
padding-inline: var(--oc-space-16, 16px);
padding-block-start: var(--oc-space-16, 16px);
padding-block-end: calc(88px + env(safe-area-inset-bottom, 0px));
}
.lead-card {
padding: var(--oc-space-16, 16px);
background-color: var(--oc-surface, #FFFFFF);
border: 1px solid var(--oc-border, #EBF1F7);
border-radius: var(--oc-radius-card, 20px);
box-shadow: var(--oc-shadow-card, 0 8px 30px rgba(0, 0, 0, 0.04));
display: flex;
flex-direction: column;
margin-block-end: var(--oc-space-16, 16px);
}
.card-header-row {
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
margin-block-end: var(--oc-space-12, 12px);
}
.section-title {
font-size: 15px;
font-weight: 700;
color: var(--oc-text, #101828);
line-height: 1.25;
}
.count-badge {
padding: 2px 8px;
border-radius: var(--oc-radius-pill, 9999px);
background-color: var(--oc-primary-soft, #EBF5FF);
}
.count-badge-text {
font-size: 11px;
font-weight: 700;
color: var(--oc-primary, #0088FF);
}
/* 1. Lead Profile */
.profile-hero-row {
display: flex;
flex-direction: row;
align-items: center;
}
.lead-avatar-wrap {
width: 46px;
height: 46px;
border-radius: var(--oc-radius-btn, 14px);
background-color: var(--oc-primary-soft, #EBF5FF);
display: flex;
align-items: center;
justify-content: center;
margin-inline-end: var(--oc-space-12, 12px);
}
.lead-avatar-text {
font-size: 18px;
font-weight: 700;
color: var(--oc-primary, #0088FF);
}
.lead-main-info {
flex: 1;
display: flex;
flex-direction: column;
}
.lead-name {
font-size: 20px;
font-weight: 700;
color: var(--oc-text, #101828);
line-height: 1.25;
margin-block-end: 4px;
}
.lead-company {
font-size: 13px;
color: var(--oc-text-2, #64748B);
line-height: 1.4;
}
.lead-badge-col {
display: flex;
flex-direction: column;
align-items: flex-end;
margin-inline-start: var(--oc-space-8, 8px);
}
.lead-score-pill {
padding: 3px 10px;
border-radius: var(--oc-radius-pill, 9999px);
background-color: var(--oc-primary-soft, #EBF5FF);
margin-block-end: 6px;
}
.lead-score-text {
font-size: 12px;
font-weight: 700;
color: var(--oc-primary, #0088FF);
}
.lead-status-pill {
padding: 3px 10px;
border-radius: var(--oc-radius-pill, 9999px);
background-color: var(--oc-bg, #F5F8FC);
border: 1px solid var(--oc-border, #EBF1F7);
}
.lead-status-hot-pill {
background-color: rgba(240, 68, 56, 0.08);
border-color: rgba(240, 68, 56, 0.2);
}
.lead-status {
font-size: 12px;
font-weight: 600;
color: var(--oc-primary, #0B5CFF);
}
.lead-status-hot {
color: var(--oc-error, #F04438);
}
.lead-outreach-row {
display: flex;
flex-direction: row;
flex-wrap: wrap;
align-items: center;
margin-block-start: var(--oc-space-12, 12px);
padding-block-start: var(--oc-space-12, 12px);
border-top: 1px solid var(--oc-border, #EBF1F7);
}
.outreach-pill {
height: 32px;
min-height: 32px;
padding-inline: var(--oc-space-12, 12px);
border-radius: var(--oc-radius-pill, 9999px);
background-color: var(--oc-bg, #F5F8FC);
border: 1px solid var(--oc-border, #EBF1F7);
display: flex;
align-items: center;
justify-content: center;
margin-inline-end: var(--oc-space-8, 8px);
margin-block: 4px;
}
.outreach-pill-text {
font-size: 12px;
font-weight: 600;
color: var(--oc-primary, #0088FF);
}
.whatsapp-pill {
background-color: rgba(18, 183, 106, 0.08);
border-color: rgba(18, 183, 106, 0.24);
}
.whatsapp-text {
color: #12B76A;
font-weight: 700;
}
.contact-pill {
background-color: var(--oc-primary-soft, #EBF5FF);
border-color: rgba(0, 136, 255, 0.2);
}
.contact-text {
color: var(--oc-primary, #0088FF);
font-weight: 700;
}
.source-tag {
height: 32px;
padding-inline: var(--oc-space-8, 8px);
border-radius: var(--oc-radius-pill, 9999px);
background-color: var(--oc-surface, #FFFFFF);
border: 1px dashed var(--oc-border, #EBF1F7);
display: flex;
align-items: center;
justify-content: center;
margin-block: 4px;
}
.source-tag-text {
font-size: 11px;
color: var(--oc-text-2, #64748B);
}
/* 2. Commercial Stage Stepper */
.stage-stepper {
display: flex;
flex-direction: row;
justify-content: space-between;
}
.stage-pill {
flex: 1;
height: 34px;
border-radius: var(--oc-radius-pill, 9999px);
background-color: var(--oc-bg, #F5F8FC);
border: 1px solid var(--oc-border, #EBF1F7);
display: flex;
align-items: center;
justify-content: center;
margin-inline: 3px;
transition: opacity 150ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.stage-pill-active {
background-color: var(--oc-primary, #0088FF);
border-color: var(--oc-primary, #0088FF);
box-shadow: 0 4px 12px rgba(0, 136, 255, 0.24);
}
.stage-pill-text {
font-size: 12px;
font-weight: 500;
color: var(--oc-text-2, #64748B);
}
.stage-pill-active .stage-pill-text {
color: #FFFFFF;
font-weight: 700;
}
/* 3. Radar Timeline */
.timeline {
max-height: 240px;
background-color: var(--oc-bg, #F5F8FC);
border: 1px solid var(--oc-border, #EBF1F7);
border-radius: var(--oc-radius-btn, 14px);
}
.timeline-empty {
padding: var(--oc-space-16, 16px);
display: flex;
align-items: center;
justify-content: center;
}
.timeline-empty-text {
font-size: 13px;
color: var(--oc-text-2, #64748B);
line-height: 1.6;
}
.timeline-item {
padding: var(--oc-space-12, 12px) var(--oc-space-16, 16px);
border-bottom: 1px solid var(--oc-border, #EBF1F7);
display: flex;
flex-direction: column;
}
.timeline-header-line {
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
margin-block-end: 4px;
}
.timeline-place {
font-size: 14px;
font-weight: 700;
color: var(--oc-text, #101828);
line-height: 1.25;
}
.timeline-touch-wrap {
padding: 2px 6px;
border-radius: 6px;
background-color: var(--oc-primary-soft, #EBF5FF);
}
.timeline-touch {
font-size: 11px;
font-weight: 700;
color: var(--oc-primary, #0088FF);
text-transform: uppercase;
}
.timeline-metrics {
display: flex;
flex-direction: row;
}
.timeline-metric {
font-size: 12px;
color: var(--oc-text-2, #64748B);
line-height: 1.6;
margin-inline-end: 12px;
}
/* 4. AI Card */
.ai-card {
background-color: var(--oc-surface, #FFFFFF);
border: 1px solid rgba(0, 136, 255, 0.16);
border-left: 4px solid var(--oc-primary, #0088FF);
}
.ai-header-row {
display: flex;
flex-direction: row;
align-items: center;
margin-block-end: var(--oc-space-8, 8px);
}
.ai-pulse-dot {
width: 6px;
height: 6px;
border-radius: 3px;
background-color: var(--oc-primary, #0088FF);
margin-inline-end: 6px;
}
.ai-badge-text {
font-size: 11px;
font-weight: 700;
color: var(--oc-primary, #0088FF);
letter-spacing: 0.5px;
}
.ai-script {
font-size: 13px;
color: var(--oc-text, #101828);
line-height: 1.5;
margin-block-end: var(--oc-space-8, 8px);
}
.ai-result-box {
background-color: var(--oc-bg, #F5F8FC);
border: 1px solid var(--oc-border, #EBF1F7);
border-radius: 12px;
padding: var(--oc-space-12, 12px);
margin-block-end: var(--oc-space-12, 12px);
display: flex;
flex-direction: column;
}
.ai-result-text {
font-size: 13px;
line-height: 1.6;
color: var(--oc-text, #101828);
margin-block-end: var(--oc-space-8, 8px);
}
.ai-result-actions {
display: flex;
flex-direction: row;
justify-content: flex-end;
}
.ai-copy-btn {
height: 28px;
padding-inline: 10px;
border-radius: var(--oc-radius-pill, 9999px);
background-color: var(--oc-primary-soft, #EBF5FF);
display: flex;
align-items: center;
justify-content: center;
}
.ai-copy-btn-text {
font-size: 11px;
font-weight: 700;
color: var(--oc-primary, #0088FF);
}
.ai-footer-row {
display: flex;
flex-direction: row;
justify-content: flex-end;
}
.ai-gen-btn {
height: 34px;
min-height: 32px;
padding-inline: 14px;
border-radius: var(--oc-radius-pill, 9999px);
background-color: var(--oc-primary-soft, #EBF5FF);
border: 1px solid rgba(0, 136, 255, 0.2);
display: flex;
align-items: center;
justify-content: center;
}
.ai-gen-btn-loading {
opacity: 0.6;
}
.ai-gen-btn-text {
font-size: 12px;
font-weight: 700;
color: var(--oc-primary, #0088FF);
}
/* 5. Notes Section */
.notes-history-box {
margin-block-end: var(--oc-space-12, 12px);
padding: var(--oc-space-12, 12px);
background-color: var(--oc-bg, #F5F8FC);
border: 1px solid var(--oc-border, #EBF1F7);
border-radius: var(--oc-radius-btn, 14px);
}
.notes-history-label {
font-size: 11px;
font-weight: 600;
color: var(--oc-text-2, #64748B);
margin-block-end: 6px;
}
.existing-notes {
font-size: 13px;
color: var(--oc-text, #101828);
line-height: 1.6;
}
.notes-compose-box {
display: flex;
flex-direction: column;
}
.notes-input {
min-height: 88px;
padding: var(--oc-space-12, 12px);
background-color: var(--oc-surface, #FFFFFF);
border: 1px solid var(--oc-border, #EBF1F7);
border-radius: var(--oc-radius-btn, 14px);
font-size: 16px;
color: var(--oc-text, #101828);
line-height: 1.6;
box-sizing: border-box;
}
.upload-hint {
font-size: 12px;
color: var(--oc-text-2, #64748B);
line-height: 1.6;
margin-block-start: var(--oc-space-12, 12px);
}
.notes-attachments {
margin-block-start: var(--oc-space-8, 8px);
}
.lead-error {
margin-block-end: var(--oc-space-12, 12px);
}
.lead-error-text {
font-size: 12px;
color: var(--oc-error, #F04438);
}
/* 6. Floating CTA Bar */
.lead-cta-bar {
position: fixed;
left: 0;
right: 0;
bottom: var(--window-bottom, 0px);
padding: 12px 16px calc(16px + env(safe-area-inset-bottom, 0px));
background-color: rgba(255, 255, 255, 0.96);
border-top: 1px solid var(--oc-border, #EBF1F7);
z-index: 100;
box-sizing: border-box;
display: flex;
justify-content: center;
}
.lead-cta-inner {
width: 100%;
max-width: 480px;
}
.primary-cta-btn {
height: 48px;
min-height: 44px;
width: 100%;
border-width: 0;
border-radius: var(--oc-radius-pill, 9999px);
background-color: var(--oc-primary, #0B5CFF);
box-shadow: var(--oc-shadow-cta, 0 8px 20px rgba(0, 136, 255, 0.22));
display: flex;
align-items: center;
justify-content: center;
transition: opacity 150ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.primary-cta-btn:active {
opacity: 0.88;
}
.primary-cta-btn-disabled {
background-color: var(--oc-border, #E3E7ED);
box-shadow: none;
}
.primary-cta-btn-text {
color: #FFFFFF;
font-size: 15px;
font-weight: 700;
}
.primary-cta-btn-disabled .primary-cta-btn-text {
color: var(--oc-text-2, #64748B);
}
@media (prefers-reduced-motion: reduce) {
* {
animation: none !important;
transition: none !important;
}
}
</style>