Implements Phase 5 of AGENTS.md §11 (FR-8, FR-15): - Message detail pane (GET /partials/message) with body, recommended action, reply identity, template picker, editable draft, and history. - internal/reply: OmniRoute (OpenAI-compatible) chat client and a template-based draft generator. All non-JEV models go through OmniRoute (§10). - internal/mailops: SMTP send over smtp.gmail.com:587 with STARTTLS and the app password, forcing IPv4 (§9); FR-15 reply identity (send as the arrived-at X-Pm-Original-To address, else "Sam Rolfe"); threading via In-Reply-To/References; -check-smtp safe verification; and a [Gmail]/Sent Mail thread check. - Migration v5 stores messages.message_id_header and drafts.sent_at; mailfetch parses Message-ID. - Send is user-triggered only: CSRF + UI confirm + confirm=yes guard, no auto-send, duplicate-send refused. A sent reply files the original under Replied-to/<address> and logs every step (FR-13). - Tests for reply, mailops SMTP/identity/thread check, store drafts and migration v5, and the server draft/edit/send guards. - docs/phase5-replies.md, README, .env.example, docker-compose updated. Co-Authored-By: Paperclip <noreply@paperclip.ing>
469 lines
14 KiB
CSS
469 lines
14 KiB
CSS
/* ============================================================
|
|
Email Agent — application styles
|
|
Built on Family Home Lab tokens.css (do not edit tokens here).
|
|
Base unit: 8px. Touch targets >= 44px. Pill CTAs, 4px inputs.
|
|
============================================================ */
|
|
|
|
*,
|
|
*::before,
|
|
*::after { box-sizing: border-box; }
|
|
|
|
html, body { height: 100%; }
|
|
|
|
body {
|
|
margin: 0;
|
|
font: var(--type-body-md);
|
|
color: var(--ink-secondary);
|
|
background: var(--canvas-soft);
|
|
-webkit-font-smoothing: antialiased;
|
|
}
|
|
|
|
h1, h2, h3, p { margin: 0; }
|
|
|
|
a { color: var(--primary); text-decoration: none; }
|
|
a:hover { text-decoration: underline; }
|
|
|
|
:focus-visible {
|
|
outline: 2px solid var(--primary);
|
|
outline-offset: 2px;
|
|
}
|
|
|
|
/* ---------- primitives ---------- */
|
|
|
|
.btn {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: var(--space-xs);
|
|
min-height: 44px;
|
|
padding: 0 var(--space-lg);
|
|
border: 1px solid transparent;
|
|
border-radius: var(--rounded-full);
|
|
font: var(--type-button);
|
|
cursor: pointer;
|
|
transition: transform .08s ease, background-color .15s ease, box-shadow .15s ease;
|
|
white-space: nowrap;
|
|
}
|
|
.btn:active { transform: scale(.97); }
|
|
|
|
.btn-primary {
|
|
background: var(--primary);
|
|
color: var(--on-primary);
|
|
}
|
|
.btn-primary:hover { background: var(--primary-active); }
|
|
|
|
.btn-utility {
|
|
background: var(--surface);
|
|
color: var(--ink);
|
|
border-radius: var(--rounded-md);
|
|
min-height: 44px;
|
|
padding: 0 var(--space-md);
|
|
box-shadow: var(--shadow-level-1);
|
|
border: 1px solid var(--hairline);
|
|
}
|
|
.btn-utility:hover { background: var(--surface-2); }
|
|
|
|
.btn-block { width: 100%; }
|
|
|
|
.text-input {
|
|
width: 100%;
|
|
min-height: 44px;
|
|
padding: var(--space-xs) var(--space-sm);
|
|
background: var(--surface);
|
|
color: var(--ink);
|
|
font: var(--type-body-md);
|
|
border: 1px solid var(--hairline);
|
|
border-radius: var(--rounded-xs);
|
|
}
|
|
.text-input:focus {
|
|
outline: none;
|
|
border-color: var(--primary);
|
|
box-shadow: var(--shadow-level-1);
|
|
}
|
|
|
|
.field { display: flex; flex-direction: column; gap: var(--space-xxs); }
|
|
.field > label { font: var(--type-caption); color: var(--ink-muted); }
|
|
|
|
.pill {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: var(--space-xxs);
|
|
padding: 4px 8px;
|
|
border-radius: var(--rounded-full);
|
|
font: var(--type-eyebrow);
|
|
background: var(--surface);
|
|
border: 1px solid var(--hairline);
|
|
color: var(--ink-muted);
|
|
}
|
|
|
|
.hairline { border: 1px solid var(--hairline); }
|
|
|
|
.muted { color: var(--ink-muted); }
|
|
.faint { color: var(--ink-faint); }
|
|
|
|
/* ---------- login ---------- */
|
|
|
|
.login-body {
|
|
background: var(--secondary);
|
|
}
|
|
|
|
.login-wrap {
|
|
min-height: 100dvh;
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: var(--space-xl);
|
|
padding: var(--space-lg);
|
|
}
|
|
|
|
.login-greeting {
|
|
font: var(--type-display-1);
|
|
color: #fff;
|
|
text-align: center;
|
|
letter-spacing: -1.5px;
|
|
}
|
|
|
|
.auth-card {
|
|
width: 100%;
|
|
max-width: 400px;
|
|
background: var(--surface);
|
|
border-radius: var(--rounded-lg);
|
|
box-shadow: var(--shadow-level-2);
|
|
padding: var(--space-xxl) var(--space-lg);
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: var(--space-lg);
|
|
}
|
|
|
|
.auth-brand {
|
|
font: var(--type-eyebrow);
|
|
color: var(--ink-faint);
|
|
letter-spacing: .125px;
|
|
text-transform: uppercase;
|
|
}
|
|
|
|
.auth-card h1, .auth-card h2 {
|
|
font: var(--type-heading-1);
|
|
color: var(--ink);
|
|
}
|
|
.auth-card h2 { font: var(--type-heading-2); }
|
|
|
|
.auth-card p { font: var(--type-body-sm); color: var(--ink-muted); }
|
|
|
|
.auth-form { display: flex; flex-direction: column; gap: var(--space-md); }
|
|
|
|
.alert {
|
|
padding: var(--space-xs) var(--space-sm);
|
|
border-radius: var(--rounded-xs);
|
|
font: var(--type-body-sm);
|
|
border: 1px solid var(--hairline);
|
|
background: var(--surface-2);
|
|
color: var(--ink-secondary);
|
|
}
|
|
.alert-error { border-color: var(--sticker-red); color: var(--sticker-red); }
|
|
|
|
/* ---------- dashboard chrome ---------- */
|
|
|
|
.nav-bar {
|
|
position: sticky;
|
|
top: 0;
|
|
z-index: 10;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
gap: var(--space-md);
|
|
padding: var(--space-xs) var(--space-md);
|
|
min-height: 56px;
|
|
background: var(--surface);
|
|
border-bottom: 1px solid var(--hairline);
|
|
}
|
|
.nav-bar .wordmark { font: var(--type-title); color: var(--ink); }
|
|
.nav-bar .nav-actions { display: flex; align-items: center; gap: var(--space-xs); }
|
|
|
|
.page { max-width: var(--container-max); margin: 0 auto; padding: var(--space-lg) var(--space-md); }
|
|
|
|
.greeting { font: var(--type-heading-1); color: var(--ink); margin-bottom: var(--space-lg); }
|
|
|
|
.shell {
|
|
display: grid;
|
|
grid-template-columns: 1fr;
|
|
gap: var(--space-md);
|
|
align-items: start;
|
|
}
|
|
|
|
@media (min-width: 760px) {
|
|
.shell { grid-template-columns: 220px minmax(0, 1fr); }
|
|
}
|
|
@media (min-width: 1080px) {
|
|
.shell { grid-template-columns: 220px minmax(0, 1fr) 340px; }
|
|
}
|
|
|
|
.panel {
|
|
background: var(--surface);
|
|
border: 1px solid var(--hairline);
|
|
border-radius: var(--rounded-lg);
|
|
overflow: hidden;
|
|
}
|
|
|
|
.panel-head {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
gap: var(--space-xs);
|
|
padding: var(--space-sm) var(--space-md);
|
|
border-bottom: 1px solid var(--hairline);
|
|
}
|
|
.panel-head h2 { font: var(--type-title); color: var(--ink); }
|
|
.panel-actions { display: flex; align-items: center; gap: var(--space-xs); flex-wrap: wrap; }
|
|
|
|
/* scan status line above the message list */
|
|
.scan-note-slot:empty { display: none; }
|
|
.scan-note {
|
|
padding: var(--space-xs) var(--space-md);
|
|
font: var(--type-body-sm);
|
|
color: var(--ink-muted);
|
|
background: var(--surface-2);
|
|
border-bottom: 1px solid var(--hairline);
|
|
}
|
|
|
|
.panel-body { padding: var(--space-md); }
|
|
|
|
/* left nav: vertical list on desktop, horizontal scroller on phone */
|
|
.nav-groups { display: flex; flex-direction: column; gap: var(--space-md); padding: var(--space-md); }
|
|
|
|
@media (max-width: 759px) {
|
|
.nav-groups {
|
|
flex-direction: row;
|
|
overflow-x: auto;
|
|
gap: var(--space-md);
|
|
padding: var(--space-xs) var(--space-sm);
|
|
-webkit-overflow-scrolling: touch;
|
|
}
|
|
.nav-group { min-width: max-content; }
|
|
.nav-group-items { flex-direction: row; }
|
|
}
|
|
|
|
.nav-group-title {
|
|
font: var(--type-eyebrow);
|
|
color: var(--ink-faint);
|
|
text-transform: uppercase;
|
|
letter-spacing: .125px;
|
|
margin-bottom: var(--space-xs);
|
|
}
|
|
.nav-group-items { display: flex; flex-direction: column; gap: 2px; }
|
|
|
|
.nav-item {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: var(--space-xs);
|
|
min-height: 44px;
|
|
padding: 0 var(--space-sm);
|
|
border-radius: var(--rounded-sm);
|
|
font: var(--type-body-sm);
|
|
color: var(--ink-secondary);
|
|
}
|
|
.nav-item:hover { background: var(--surface-2); text-decoration: none; }
|
|
.nav-item .dot {
|
|
width: 8px; height: 8px; border-radius: var(--rounded-full);
|
|
background: var(--ink-faint); flex: 0 0 auto;
|
|
}
|
|
.nav-item .count { margin-left: auto; font: var(--type-caption); color: var(--ink-faint); }
|
|
|
|
/* centre list */
|
|
.msg-list { display: flex; flex-direction: column; }
|
|
.msg-group { display: flex; flex-direction: column; }
|
|
.msg-group-head {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
gap: var(--space-sm);
|
|
padding: var(--space-xs) var(--space-md);
|
|
background: var(--surface-2);
|
|
border-bottom: 1px solid var(--hairline);
|
|
font: var(--type-eyebrow);
|
|
color: var(--ink-muted);
|
|
text-transform: uppercase;
|
|
letter-spacing: .125px;
|
|
}
|
|
.msg-group-head .count { font: var(--type-caption); color: var(--ink-faint); text-transform: none; }
|
|
.msg-row {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: var(--space-sm);
|
|
min-height: 64px;
|
|
padding: var(--space-sm) var(--space-md);
|
|
border-bottom: 1px solid var(--hairline);
|
|
}
|
|
.msg-row:last-child { border-bottom: 0; }
|
|
.msg-main { min-width: 0; flex: 1 1 auto; display: flex; flex-direction: column; gap: 2px; }
|
|
.msg-from { font: var(--type-body-sm); color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
.msg-subject { font: var(--type-body-sm); color: var(--ink-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
.msg-source { font: var(--type-caption); color: var(--ink-faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
.msg-source .source-addr { color: var(--ink-muted); }
|
|
.msg-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: 0 0 auto; }
|
|
.msg-when { font: var(--type-caption); color: var(--ink-faint); white-space: nowrap; }
|
|
.action-pill { background: var(--primary-soft, var(--surface-2)); color: var(--primary); border-color: var(--primary); white-space: nowrap; }
|
|
.nav-item-active { background: var(--surface-2); color: var(--ink); font-weight: 500; }
|
|
|
|
.empty-state {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
gap: var(--space-sm);
|
|
text-align: center;
|
|
padding: var(--space-xxl) var(--space-lg);
|
|
}
|
|
.empty-state .empty-title { font: var(--type-title); color: var(--ink); }
|
|
.empty-state .empty-copy { font: var(--type-body-sm); color: var(--ink-muted); max-width: 32ch; }
|
|
|
|
.detail-body { padding: var(--space-lg) var(--space-md); }
|
|
|
|
/* dark-mode toggle shows the right glyph */
|
|
.theme-toggle .icon-dark { display: none; }
|
|
[data-theme="dark"] .theme-toggle .icon-dark { display: inline; }
|
|
[data-theme="dark"] .theme-toggle .icon-light { display: none; }
|
|
|
|
/* subtle, non-decorative loading pulse (no spinners) */
|
|
.htmx-request .empty-state { opacity: .55; transition: opacity .15s ease; }
|
|
.btn.htmx-request { opacity: .55; transition: opacity .15s ease; }
|
|
|
|
/* Phase 3: classifier confidence on each row */
|
|
.msg-confidence { font: var(--type-caption); color: var(--ink-faint); white-space: nowrap; }
|
|
|
|
/* Phase 3: editable category list (FR-14) */
|
|
.nav-group-title { display: flex; align-items: center; justify-content: space-between; gap: var(--space-xs); }
|
|
.nav-edit { font: var(--type-caption); color: var(--primary); }
|
|
|
|
.categories-panel { margin-top: var(--space-md); }
|
|
.categories-help { font: var(--type-body-sm); margin-bottom: var(--space-md); max-width: 68ch; }
|
|
|
|
.category-add {
|
|
display: grid;
|
|
grid-template-columns: 1fr 2fr auto;
|
|
align-items: end;
|
|
gap: var(--space-sm);
|
|
padding-bottom: var(--space-md);
|
|
border-bottom: 1px solid var(--hairline);
|
|
}
|
|
|
|
.category-list { display: flex; flex-direction: column; }
|
|
.category-row {
|
|
display: flex;
|
|
align-items: end;
|
|
gap: var(--space-sm);
|
|
padding: var(--space-sm) 0;
|
|
border-bottom: 1px solid var(--hairline);
|
|
}
|
|
.category-row:last-child { border-bottom: 0; }
|
|
.category-rename {
|
|
display: grid;
|
|
grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) auto auto;
|
|
align-items: end;
|
|
gap: var(--space-sm);
|
|
flex: 1 1 auto;
|
|
}
|
|
.category-desc { min-width: 0; padding-bottom: var(--space-xs); }
|
|
.category-desc .muted { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
.category-rename .count { white-space: nowrap; padding-bottom: var(--space-xs); }
|
|
.category-remove { flex: 0 0 auto; }
|
|
.btn-danger { color: var(--sticker-red); border-color: var(--sticker-red); }
|
|
|
|
@media (max-width: 759px) {
|
|
.category-add { grid-template-columns: 1fr; }
|
|
.category-row { flex-direction: column; align-items: stretch; }
|
|
.category-rename { grid-template-columns: 1fr; }
|
|
.category-remove .btn { width: 100%; }
|
|
}
|
|
|
|
/* Phase 4: bulk triage toolbar (FR-6) and recoverable-delete views (FR-9) */
|
|
.bulk-toolbar {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: var(--space-sm);
|
|
flex-wrap: wrap;
|
|
padding: var(--space-sm) var(--space-md);
|
|
border-bottom: 1px solid var(--hairline);
|
|
background: var(--surface);
|
|
}
|
|
.bulk-check {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: var(--space-xs);
|
|
min-height: 44px;
|
|
font: var(--type-body-sm);
|
|
color: var(--ink-secondary);
|
|
}
|
|
.bulk-check input,
|
|
.msg-select {
|
|
width: 18px;
|
|
height: 18px;
|
|
flex: 0 0 auto;
|
|
accent-color: var(--primary);
|
|
}
|
|
.selected-count { font: var(--type-caption); color: var(--ink-faint); }
|
|
.bulk-actions { display: flex; align-items: center; gap: var(--space-xs); flex-wrap: wrap; }
|
|
.view-label {
|
|
margin-left: auto;
|
|
font: var(--type-eyebrow);
|
|
text-transform: uppercase;
|
|
letter-spacing: .125px;
|
|
color: var(--ink-faint);
|
|
}
|
|
.btn-small { min-height: 32px; padding: 0 var(--space-sm); font: var(--type-caption); }
|
|
.scan-note-error { color: var(--sticker-red); }
|
|
|
|
/* Phase 5: message detail, reply draft, and send (FR-8, FR-15) */
|
|
#message-detail { min-width: 0; }
|
|
.msg-open {
|
|
display: block;
|
|
width: 100%;
|
|
padding: 0;
|
|
border: 0;
|
|
background: none;
|
|
text-align: left;
|
|
cursor: pointer;
|
|
font: inherit;
|
|
color: inherit;
|
|
}
|
|
.msg-open:hover .msg-subject,
|
|
.msg-open:focus-visible .msg-subject { color: var(--primary); }
|
|
.detail-meta { display: grid; gap: var(--space-xs); margin-bottom: var(--space-md); }
|
|
.detail-subject { font: var(--type-title-sm, 600 16px/1.3 Inter, sans-serif); color: var(--ink); }
|
|
.detail-pills { display: flex; align-items: center; gap: var(--space-xs); flex-wrap: wrap; }
|
|
.detail-original { margin: var(--space-sm) 0 var(--space-md); }
|
|
.detail-original summary {
|
|
cursor: pointer;
|
|
font: var(--type-eyebrow);
|
|
text-transform: uppercase;
|
|
letter-spacing: .125px;
|
|
color: var(--ink-faint);
|
|
padding: var(--space-xs) 0;
|
|
}
|
|
.detail-text {
|
|
margin: var(--space-xs) 0 0;
|
|
padding: var(--space-sm);
|
|
max-height: 320px;
|
|
overflow: auto;
|
|
white-space: pre-wrap;
|
|
overflow-wrap: anywhere;
|
|
background: var(--canvas-soft, var(--surface-2, #f6f5f4));
|
|
border: 1px solid var(--hairline);
|
|
border-radius: 4px;
|
|
font: var(--type-body-sm);
|
|
color: var(--ink-secondary);
|
|
}
|
|
.reply-box { border-top: 1px solid var(--hairline); padding-top: var(--space-md); display: grid; gap: var(--space-sm); }
|
|
.reply-box h3, .reply-history h3 { font: var(--type-eyebrow); text-transform: uppercase; letter-spacing: .125px; color: var(--ink-faint); margin: 0; }
|
|
.reply-identity { display: grid; gap: 2px; font: var(--type-body-sm); }
|
|
.reply-value { color: var(--ink-secondary); overflow-wrap: anywhere; }
|
|
.reply-draft-form, .reply-send-form { display: grid; gap: var(--space-sm); }
|
|
.reply-textarea { width: 100%; resize: vertical; min-height: 160px; line-height: 1.5; }
|
|
.reply-actions { display: flex; align-items: center; gap: var(--space-sm); flex-wrap: wrap; }
|
|
.reply-history { border-top: 1px solid var(--hairline); margin-top: var(--space-md); padding-top: var(--space-md); }
|
|
.history-list { list-style: none; margin: var(--space-xs) 0 0; padding: 0; display: grid; gap: var(--space-xs); }
|
|
.history-list li { font: var(--type-caption); color: var(--ink-secondary); overflow-wrap: anywhere; }
|
|
@media (max-width: 759px) {
|
|
.reply-actions .btn { flex: 1 1 auto; }
|
|
}
|