-

-
+
+

+
+ {/* Chrome sitting on top of a photo, so it is deliberately dark in
+ both themes rather than following the surface tokens. */}
-
) : (
fileRef.current?.click()} disabled={uploadingCover}
- onDragOver={e => { e.preventDefault(); e.currentTarget.style.borderColor = '#6366f1'; e.currentTarget.style.background = 'rgba(99,102,241,0.04)' }}
- onDragLeave={e => { e.currentTarget.style.borderColor = '#e5e7eb'; e.currentTarget.style.background = 'none' }}
- onDrop={e => { e.preventDefault(); e.currentTarget.style.borderColor = '#e5e7eb'; e.currentTarget.style.background = 'none'; const file = e.dataTransfer.files?.[0]; if (file?.type.startsWith('image/')) handleCoverSelect(file) }}
- style={{ width: '100%', padding: '18px', border: '2px dashed #e5e7eb', borderRadius: 10, background: 'none', cursor: 'pointer', display: 'flex', alignItems: 'center', justifyContent: 'center', gap: 6, fontSize: 'calc(13px * var(--fs-scale-body, 1))', color: '#9ca3af', fontFamily: 'inherit', transition: 'all 0.15s' }}
- onMouseEnter={e => { e.currentTarget.style.borderColor = '#d1d5db'; e.currentTarget.style.color = '#6b7280' }}
- onMouseLeave={e => { e.currentTarget.style.borderColor = '#e5e7eb'; e.currentTarget.style.color = '#9ca3af' }}>
+ onDragOver={e => { e.preventDefault(); setCoverDragActive(true) }}
+ onDragLeave={() => setCoverDragActive(false)}
+ onDrop={e => { e.preventDefault(); setCoverDragActive(false); const file = e.dataTransfer.files?.[0]; if (file?.type.startsWith('image/')) handleCoverSelect(file) }}
+ className={`w-full h-[130px] px-4 border-2 border-dashed rounded-xl flex items-center justify-center gap-1.5 text-body transition-colors ${
+ coverDragActive
+ ? 'border-accent bg-accent-subtle text-content'
+ : 'border-edge text-content-faint hover:border-edge-secondary hover:text-content-muted'
+ }`}>
{uploadingCover ? t('common.uploading') : t('dashboard.addCoverImage')}
)}
@@ -442,12 +467,12 @@ export default function TripFormModal({ isOpen, onClose, onSave, trip, onCoverUp
className={inputCls}
/>
- {searchingCover ? : }
+ className="px-3 py-2 text-body text-content-secondary border border-edge rounded-xl hover:bg-surface-hover disabled:opacity-40 disabled:cursor-not-allowed flex items-center gap-1.5 whitespace-nowrap">
+ {searchingCover ? : }
{t('dashboard.searchUnsplash')}
- {coverSearchError &&
{coverSearchError}
}
+ {coverSearchError &&
{coverSearchError}
}
{coverSearchResults.length > 0 && (
{coverSearchResults.map(photo => (
@@ -456,11 +481,11 @@ export default function TripFormModal({ isOpen, onClose, onSave, trip, onCoverUp
key={photo.id}
onClick={() => handleUnsplashSelect(photo)}
aria-label={t('dashboard.useUnsplashPhoto', { photographer: photo.photographer || 'Unsplash' })}
- className={`relative h-20 overflow-hidden rounded-lg border transition-colors ${coverPreview === photo.url ? 'border-slate-900 ring-2 ring-slate-900/20' : 'border-slate-200 hover:border-slate-400'}`}
+ className={`relative h-20 overflow-hidden rounded-xl border transition-colors ${coverPreview === photo.url ? 'border-accent ring-2 ring-accent/20' : 'border-edge hover:border-content-faint'}`}
>

{photo.photographer && (
-
+
{photo.photographer}
)}
@@ -470,31 +495,40 @@ export default function TripFormModal({ isOpen, onClose, onSave, trip, onCoverUp
)}
}
-
-
- canEditTrip && update('title', e.target.value)}
- required readOnly={!canEditTrip} placeholder={t('dashboard.tripTitlePlaceholder')} className={inputCls} />
-
-
-
-
-
-
-
+
-
+
+
+ {t('dashboard.tripDescription')}
+
+
+
+
{/* /left column */}
+
+ {/* Right column — when it happens, in what currency, with whom. */}
+
+
+
+
+
+
+
+ {t('dashboard.startDate')}
update('start_date', v)} placeholder={t('dashboard.startDate')} />
-
- {t('dashboard.endDate')}
+
+ {t('dashboard.endDate')}
update('end_date', v)} placeholder={t('dashboard.endDate')} />
@@ -502,7 +536,7 @@ export default function TripFormModal({ isOpen, onClose, onSave, trip, onCoverUp
{!formData.start_date && !formData.end_date && (
-
+
{t('dashboard.dayCount')}
- {t('dashboard.dayCountHint')}
+ {t('dashboard.dayCountHint')}
)}
-
{t('dashboard.currency')}
+
{t('dashboard.currency')}
canEditTrip && update('currency', v)}
@@ -530,11 +564,11 @@ export default function TripFormModal({ isOpen, onClose, onSave, trip, onCoverUp
{/* Reminder — only visible to owner (or when creating) */}
{(!isEditing || trip?.user_id === currentUser?.id || currentUser?.role === 'admin') && (
-
- {t('trips.reminder')}
+
+ {t('trips.reminder')}
{!tripRemindersEnabled ? (
-
+
{t('trips.reminderDisabledHint')}
) : (
@@ -548,20 +582,20 @@ export default function TripFormModal({ isOpen, onClose, onSave, trip, onCoverUp
].map(opt => (
{ update('reminder_days', opt.value); setCustomReminder(false) }}
- className={`px-3 py-1.5 text-xs font-medium rounded-lg border transition-colors ${
+ className={`px-3 py-1.5 text-caption font-medium rounded-full border transition-colors ${
!customReminder && formData.reminder_days === opt.value
- ? 'bg-slate-900 text-white border-slate-900'
- : 'bg-white text-slate-600 border-slate-200 hover:border-slate-300'
+ ? 'bg-accent text-accent-text border-accent'
+ : 'bg-surface text-content-secondary border-edge hover:border-content-faint'
}`}>
{opt.label}
))}
{ setCustomReminder(true); if ([0, 1, 3, 9].includes(formData.reminder_days)) update('reminder_days', 7) }}
- className={`px-3 py-1.5 text-xs font-medium rounded-lg border transition-colors ${
+ className={`px-3 py-1.5 text-caption font-medium rounded-full border transition-colors ${
customReminder
- ? 'bg-slate-900 text-white border-slate-900'
- : 'bg-white text-slate-600 border-slate-200 hover:border-slate-300'
+ ? 'bg-accent text-accent-text border-accent'
+ : 'bg-surface text-content-secondary border-edge hover:border-content-faint'
}`}>
{t('trips.reminderCustom')}
@@ -571,8 +605,8 @@ export default function TripFormModal({ isOpen, onClose, onSave, trip, onCoverUp
update('reminder_days', Math.max(1, Math.min(30, Number(raw) || 1)))}
- className="w-20 px-3 py-1.5 border border-slate-200 rounded-lg text-sm text-slate-900 focus:outline-none focus:ring-2 focus:ring-slate-300" />
- {t('trips.reminderDaysBefore')}
+ className="w-20 px-3 py-1.5 border border-edge rounded-xl bg-surface-input text-body text-content focus:outline-none focus:ring-2 focus:ring-accent/40" />
+ {t('trips.reminderDaysBefore')}
)}
>
@@ -583,15 +617,15 @@ export default function TripFormModal({ isOpen, onClose, onSave, trip, onCoverUp
{/* Members */}
{allUsers.filter(u => u.id !== currentUser?.id).length > 0 && (
-
- {isEditing ? t('dashboard.addMembers') : t('dashboard.addMembers')}
+
+ {isEditing ? t('dashboard.addMembers') : t('dashboard.addMembers')}
{/* Existing members (editing mode) */}
{isEditing && existingMembers.length > 0 && (
-
+
{existingMembers.map(m => (
{
if (m.id === currentUser?.id) return
try {
@@ -600,11 +634,7 @@ export default function TripFormModal({ isOpen, onClose, onSave, trip, onCoverUp
toast.success(t('trips.memberRemoved', { username: m.username }))
} catch { toast.error(t('trips.memberRemoveError')) }
}}
- style={{
- display: 'flex', alignItems: 'center', gap: 5, padding: '4px 10px', borderRadius: 99,
- fontSize: 'calc(12px * var(--fs-scale-body, 1))', fontWeight: 500,
- cursor: m.id === currentUser?.id ? 'default' : 'pointer',
- }}>
+ style={{ cursor: m.id === currentUser?.id ? 'default' : 'pointer' }}>
{m.username}
{m.id !== currentUser?.id && }
@@ -613,16 +643,12 @@ export default function TripFormModal({ isOpen, onClose, onSave, trip, onCoverUp
)}
{/* Newly selected members (both modes) */}
{selectedMembers.length > 0 && (
-
+
{selectedMembers.map(uid => {
const user = allUsers.find(u => u.id === uid)!
return (
setSelectedMembers(prev => prev.filter(id => id !== uid))}
- className="bg-surface-secondary text-content border border-edge cursor-pointer"
- style={{
- display: 'flex', alignItems: 'center', gap: 5, padding: '4px 10px', borderRadius: 99,
- fontSize: 'calc(12px * var(--fs-scale-body, 1))', fontWeight: 500,
- }}>
+ className="flex items-center gap-1.5 px-2.5 py-1 rounded-full text-body font-medium bg-surface text-content border border-edge cursor-pointer">
{user.username}
@@ -657,6 +683,11 @@ export default function TripFormModal({ isOpen, onClose, onSave, trip, onCoverUp
)}
+
{/* /right panel */}
+
+
{/* /right column */}
+
+
{/* /two-column grid */}
)