/* Pink Post tidy layer (phase 1, Nov 2026): page headers, toolbars, one table component, inbox tabs.
   Plain CSS on top of app.css. Colours come from the theme variables; dark-only rules live under .dark. */

/* Soft pink/purple wash behind every page in light mode (dark mode has its own in app.css) */
body { background-image: radial-gradient(1100px 460px at 92% -12%, rgb(236 72 153 / .09), transparent 62%),
  radial-gradient(900px 420px at -8% 108%, rgb(167 139 250 / .08), transparent 60%); background-attachment: fixed; }

/* ---------- Page header: title + one-line help on the left, actions on the right ---------- */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: .75rem 1rem; margin-bottom: 1.1rem; }
.page-head > div:first-child { min-width: 0; }
.page-head .h1 { font-size: 1.4rem; line-height: 1.9rem; }
.page-sub { margin-top: .15rem; font-size: .8125rem; line-height: 1.25rem; color: rgb(var(--muted)); }
.page-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }

/* ---------- Toolbar: filters + search in one row, actions pushed right ---------- */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-bottom: .75rem; }
.toolbar .input { height: 2.125rem; font-size: .8125rem; }
.toolbar .tb-search { position: relative; flex: 1 1 11rem; min-width: 10rem; max-width: 22rem; }
.toolbar .tb-search .input { padding-left: 2rem; }
.toolbar .tb-search svg { position: absolute; left: .6rem; top: 50%; transform: translateY(-50%); color: rgb(var(--muted)); pointer-events: none; }
.toolbar .tb-gap { margin-left: auto; }
.toolbar .tb-note { font-size: .75rem; color: rgb(var(--muted)); white-space: nowrap; }

/* Segmented filter chips (status filters, inbox tabs) */
.seg { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; border: 1px solid rgb(var(--border)); border-radius: .7rem; background: rgb(var(--surface)); }
.seg a, .seg button { display: inline-flex; align-items: center; gap: .4rem; height: 1.75rem; padding: 0 .7rem; border-radius: .5rem; font-size: .8125rem; font-weight: 500; color: rgb(var(--muted)); white-space: nowrap; transition: background .15s, color .15s; }
.seg a:hover, .seg button:hover { color: rgb(var(--text)); background: rgb(var(--primary) / .06); }
.seg [aria-current], .seg .is-on { color: rgb(var(--primary)); background: rgb(var(--primary) / .1); font-weight: 600; }
.seg .n { font-size: .7rem; font-weight: 600; min-width: 1.25rem; height: 1.15rem; padding: 0 .35rem; display: inline-grid; place-items: center; border-radius: 999px; background: rgb(var(--text) / .06); color: rgb(var(--muted)); font-variant-numeric: tabular-nums; }
.seg [aria-current] .n, .seg .is-on .n { background: rgb(var(--primary)); color: #fff; }
.seg .n.warn { background: rgb(217 119 6 / .14); color: #B45309; }

/* ---------- One table component ---------- */
.tbl { background: rgb(var(--surface)); border: 1px solid rgb(var(--border)); border-radius: .85rem; box-shadow: var(--shadow); overflow: auto; max-height: calc(100dvh - 12.5rem); min-height: 0; }
.tbl.tbl-free { max-height: none; }
.tbl table.table { display: table !important; width: 100%; border-collapse: separate; border-spacing: 0; font-size: .8125rem; }
.tbl .table thead th { position: sticky; top: 0; z-index: 2; background: linear-gradient(rgb(var(--primary) / .045), rgb(var(--primary) / .045)), rgb(var(--surface));
  font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: rgb(var(--muted)); padding: .6rem .85rem; border-bottom: 1px solid rgb(var(--border)); white-space: nowrap; text-align: left; }
.tbl .table td { padding: .6rem .85rem; border-bottom: 1px solid rgb(var(--border) / .65); vertical-align: middle; line-height: 1.3rem; }
.tbl .table tbody tr:last-child td { border-bottom: 0; }
.tbl .table tbody tr:hover td { background: rgb(var(--primary) / .035); }
.tbl .table .num, .table th.num, .table td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl .table .chk { width: 2.5rem; padding-right: 0; }
.tbl .table .acts { text-align: right; white-space: nowrap; }
.tbl .table:not(.table-fixed) .acts { width: 1%; }
.cell-main { font-weight: 600; color: rgb(var(--text)); }
a.cell-main:hover { color: rgb(var(--primary)); }
.cell-sub { display: block; font-size: .75rem; color: rgb(var(--muted)); line-height: 1.1rem; }
.trunc { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.muted-dash { color: rgb(var(--muted) / .7); }
.tbl-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; margin-top: .75rem; font-size: .8125rem; color: rgb(var(--muted)); }
/* Small icon-ish row buttons */
.btn-xs { display: inline-flex; align-items: center; gap: .3rem; height: 1.75rem; padding: 0 .55rem; border-radius: .45rem; font-size: .75rem; font-weight: 500; color: rgb(var(--muted)); border: 1px solid transparent; background: transparent; white-space: nowrap; cursor: pointer; }
.btn-xs:hover { color: rgb(var(--primary)); background: rgb(var(--primary) / .07); border-color: rgb(var(--primary) / .2); }

/* Status dots + soft badges */
.st { display: inline-flex; align-items: center; gap: .4rem; font-size: .75rem; font-weight: 600; white-space: nowrap; color: rgb(var(--muted)); }
.st::before { content: ""; width: .5rem; height: .5rem; border-radius: 999px; background: currentColor; flex: none; }
.st-ok { color: #15803D; } .st-warn { color: #B45309; } .st-bad { color: #DC2626; } .st-pink { color: rgb(var(--primary)); } .st-purple { color: rgb(var(--accent)); } .st-grey { color: rgb(var(--muted)); }

/* Empty state */
.empty-state { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .35rem; padding: 3rem 1.5rem; color: rgb(var(--muted)); font-size: .8125rem; }
.empty-state .es-icon { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: 999px; margin-bottom: .35rem; color: rgb(var(--primary)); background: linear-gradient(135deg, rgb(var(--primary) / .14), rgb(var(--accent) / .12)); }
.empty-state b, .empty-state strong { color: rgb(var(--text)); font-size: .9rem; }
.empty-state .btn, .empty-state .btn-primary { margin-top: .5rem; }

/* ---------- Dashboard ---------- */
.stat { position: relative; padding: .9rem 1rem; border-radius: .85rem; background: rgb(var(--surface)); border: 1px solid rgb(var(--border)); box-shadow: var(--shadow); min-width: 0; }
.stat .k { display: flex; align-items: center; gap: .4rem; font-size: .75rem; font-weight: 600; color: rgb(var(--muted)); }
.stat .k svg { color: rgb(var(--primary)); }
.stat .v { margin-top: .3rem; font-size: 1.6rem; line-height: 1.9rem; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; color: rgb(var(--text)); }
.stat.hl { background: linear-gradient(135deg, rgb(var(--primary) / .09), rgb(var(--accent) / .07)), rgb(var(--surface)); border-color: rgb(var(--primary) / .22); }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .75rem; }
.card-h h2 { font-size: .9375rem; font-weight: 700; }
.card-h a { font-size: .75rem; color: rgb(var(--primary)); font-weight: 600; }
.list-rows > * { display: flex; align-items: center; gap: .65rem; padding: .55rem 0; border-bottom: 1px solid rgb(var(--border) / .7); min-width: 0; }
.list-rows > *:last-child { border-bottom: 0; }
.list-rows > .block { display: block; }
.cell-name { max-width: 26rem; }
.avatar { flex: none; display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 999px; font-size: .75rem; font-weight: 700; color: rgb(var(--primary)); background: linear-gradient(135deg, rgb(var(--primary) / .15), rgb(var(--accent) / .13)); text-transform: uppercase; }
.meter { height: .375rem; border-radius: 999px; background: rgb(var(--text) / .07); overflow: hidden; }
.meter > i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, rgb(var(--primary)), rgb(var(--accent))); }

/* ---------- Inbox hub tabs ---------- */
.ib-head { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; margin-bottom: .5rem; }
.ib-head h1 { font-size: 1.125rem; font-weight: 700; }
.ib-head .ib-right { margin-left: auto; display: flex; align-items: center; gap: .5rem; }
.ib-tabs a { height: 2rem; padding: 0 .8rem; }
.ib-tabs svg { opacity: .85; }
.ib-panel { height: calc(100dvh - 4.6rem); min-height: 420px; display: flex; flex-direction: column; }
.ib-panel .tbl { flex: 1; max-height: none; }
.fail-reason { font-size: .8125rem; color: rgb(var(--text)); line-height: 1.25rem; }
.fail-tip { display: block; font-size: .75rem; color: rgb(var(--muted)); margin-top: .1rem; }
.grp-row td { background: linear-gradient(rgb(var(--primary) / .03), rgb(var(--primary) / .03)), rgb(var(--surface)) !important; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: rgb(var(--muted)); padding-top: .5rem !important; padding-bottom: .5rem !important; }

/* Inbox list rows: theme colours instead of fixed greys (readable in both themes) */
#inbox-list .inbox-row.is-read { background: transparent; }
#inbox-list .inbox-row.is-read .row-sender, #inbox-list .inbox-row.is-read .row-subject { color: rgb(var(--text) / .72); }
#inbox-list .inbox-row.is-unread { background: rgb(var(--primary) / .06); border-left-color: rgb(var(--primary)); }
#inbox-list .inbox-row.is-unread .row-sender, #inbox-list .inbox-row.is-unread .row-subject { color: rgb(var(--text)); }
#inbox-list .inbox-row:hover { filter: none; background: rgb(var(--primary) / .045); }
#inbox-list .inbox-row.is-unread:hover { background: rgb(var(--primary) / .09); }
#inbox-list .inbox-row-link { padding-top: .7rem; padding-bottom: .7rem; }
#inbox-listpane .ib-filters { padding: .6rem .75rem; gap: .35rem; }
[data-inbox-grid] { background: rgb(var(--surface)); box-shadow: var(--shadow); height: calc(100dvh - 4.6rem); }

@media (max-width: 1023.98px) {
  .tbl { max-height: none; }
  .ib-panel { height: auto; min-height: 0; }
  [data-inbox-grid] { height: auto; }
  .page-head { align-items: flex-start; }
  .toolbar .tb-search { max-width: none; flex-basis: 100%; }
  .ib-head .ib-right { margin-left: 0; }
  .ib-tabs { width: 100%; }
  .ib-tabs a { flex: 1; justify-content: center; padding: 0 .4rem; }
}
@media (max-width: 639.98px) {
  .seg a { padding: 0 .5rem; font-size: .75rem; }
  .stat .v { font-size: 1.35rem; }
}

/* ---------- Dark-only adjustments ---------- */
.dark .st-ok { color: #4ADE80; } .dark .st-warn { color: #FBBF24; } .dark .st-bad { color: #F87171; }
.dark .seg .n.warn { background: rgb(251 191 36 / .16); color: #FBBF24; }
.dark .tbl .table thead th { background: linear-gradient(rgb(var(--primary) / .07), rgb(var(--primary) / .07)), rgb(var(--surface)); }
.dark #inbox-list .inbox-row.is-unread { background: rgb(var(--primary) / .12); }
.dark #inbox-list .inbox-row.is-read .row-sender, .dark #inbox-list .inbox-row.is-read .row-subject { color: rgb(var(--text) / .7); }

/* ---------- Utilities used by the tidy templates that app.css doesn't ship ---------- */
.-mx-1{margin-left:-.25rem;margin-right:-.25rem}.-mx-2{margin-left:-.5rem;margin-right:-.5rem}.gap-5{gap:1.25rem}
.h-\[2\.125rem\]{height:2.125rem}.max-w-0{max-width:0}.right-0{right:0}.shadow-none{box-shadow:none!important}
.tabular-nums{font-variant-numeric:tabular-nums}.text-\[15px\]{font-size:15px}.w-1\/2{width:50%}
.min-w-\[52rem\]{min-width:52rem}.min-w-\[56rem\]{min-width:56rem}.min-w-\[720px\]{min-width:720px}.min-w-\[7rem\]{min-width:7rem}.min-w-\[8rem\]{min-width:8rem}
.w-\[11rem\]{width:11rem}.w-\[14rem\]{width:14rem}.w-\[16rem\]{width:16rem}.w-\[17\%\]{width:17%}.w-\[18\%\]{width:18%}.w-\[22\%\]{width:22%}
.w-\[26\%\]{width:26%}.w-\[30\%\]{width:30%}.w-\[6\.5rem\]{width:6.5rem}.w-\[7\.5rem\]{width:7.5rem}.w-\[8\.5rem\]{width:8.5rem}.w-\[9\.5rem\]{width:9.5rem}
@media (min-width:640px){.sm\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}
/* Phones/tablets: wide tables scroll sideways inside their own box instead of squashing columns */
@media (max-width:1023.98px){ main .tbl table.table[class*=min-w-]{min-width:46rem!important} }

/* Phones: list tables turn into stacked rows (no sideways scrolling, nothing squashed) */
@media (max-width: 639.98px) {
  .tbl.tbl-stack { overflow: visible; }
  main .tbl.tbl-stack table.table[class], .tbl.tbl-stack table.table, .tbl.tbl-stack tbody, .tbl.tbl-stack tr, .tbl.tbl-stack td { display: block !important; width: auto !important; min-width: 0 !important; max-width: none !important; }
  .tbl.tbl-stack thead { display: none; }
  .tbl.tbl-stack tr[hidden], .tbl.tbl-stack [hidden] { display: none !important; }
  .tbl.tbl-stack tbody tr { white-space: normal !important; }
  .tbl.tbl-stack td.inl { white-space: nowrap; }
  .tbl.tbl-stack tbody tr { position: relative; padding: .65rem .85rem; border-bottom: 1px solid rgb(var(--border) / .7); }
  .tbl.tbl-stack tbody tr:last-child { border-bottom: 0; }
  .tbl.tbl-stack .table td { padding: .1rem 0 !important; border: 0 !important; text-align: left; white-space: normal; }
  .tbl.tbl-stack td.inl { display: inline-block !important; margin-right: .85rem; vertical-align: middle; }
  .tbl.tbl-stack td[data-l]::before { content: attr(data-l) " "; font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: rgb(var(--muted)); margin-right: .25rem; }
  .tbl.tbl-stack td.acts { text-align: left; margin-top: .25rem; }
  .tbl.tbl-stack td.chk { position: absolute; right: .85rem; top: .7rem; }
  .tbl.tbl-stack .grp-row { padding: .45rem .85rem; }
  .tbl.tbl-stack .trunc { white-space: normal; overflow-wrap: anywhere; }
  .tbl.tbl-stack .cell-name { max-width: none; }
}

/* ---------- Outreach records (Websites) ---------- */
.input-sm { height: 2rem; padding-top: .25rem; padding-bottom: .25rem; font-size: .8125rem; }
textarea.input-sm { height: auto; }
.chip { display: inline-flex; align-items: center; height: 1.35rem; padding: 0 .5rem; margin: 0 .25rem .15rem 0; border-radius: 999px; font-size: 11px; font-weight: 600; color: rgb(var(--accent)); background: rgb(var(--accent) / .1); white-space: nowrap; max-width: 9rem; overflow: hidden; text-overflow: ellipsis; }
.stars { display: inline-flex; gap: 1px; color: rgb(var(--muted) / .35); }
.stars .on, .star-pick .on { color: #F59E0B; }
.stars .on svg, .star-pick .on svg { fill: currentColor; }
.star-pick { display: inline-flex; gap: 0; }
.star-pick button { padding: .2rem; color: rgb(var(--muted) / .45); border-radius: .35rem; line-height: 0; }
.star-pick button:hover { color: #F59E0B; background: rgb(var(--primary) / .06); }
.add-site { display: flex; gap: .5rem; align-items: center; }
.add-site .tb-search { min-width: 12rem; }
.back-link { display: inline-flex; align-items: center; gap: .3rem; font-size: .8125rem; color: rgb(var(--muted)); margin-bottom: .5rem; }
.back-link:hover { color: rgb(var(--primary)); }
.rec-ext { color: rgb(var(--muted)); flex: none; }
.rec-ext:hover { color: rgb(var(--primary)); }
.rec-meta { align-items: center; gap: .75rem; }
.stage-sel { font-weight: 600; }
.tag-row { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; margin: -.5rem 0 1rem; color: rgb(var(--muted)); }
.tag-row .input { width: 16rem; max-width: 100%; }
.rec-grid { display: grid; gap: 1rem; grid-template-columns: minmax(0, 1fr) 22rem; align-items: start; }
.rec-main, .rec-side { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
@media (max-width: 1100px) { .rec-grid { grid-template-columns: minmax(0, 1fr); } .rec-side { order: -1; } }
.card-h h2 { display: inline-flex; align-items: center; gap: .4rem; }
.card-h h2 svg { color: rgb(var(--primary)); }
.note-form { display: flex; gap: .5rem; align-items: flex-end; margin-bottom: 1rem; }
.note-form textarea { flex: 1; min-height: 2.6rem; }
.timeline { position: relative; margin: 0; padding: 0; list-style: none; }
.timeline::before { content: ""; position: absolute; left: .7rem; top: .4rem; bottom: .4rem; width: 2px; background: rgb(var(--border)); border-radius: 2px; }
.timeline li { position: relative; display: flex; gap: .75rem; padding: .45rem 0; }
.tl-dot { position: relative; z-index: 1; flex: none; display: grid; place-items: center; width: 1.45rem; height: 1.45rem; border-radius: 999px; background: rgb(var(--surface)); border: 2px solid rgb(var(--border)); color: rgb(var(--muted)); }
.tl-sent .tl-dot, .tl-campaign .tl-dot { border-color: rgb(var(--accent) / .45); color: rgb(var(--accent)); }
.tl-reply .tl-dot, .tl-note .tl-dot, .tl-stage .tl-dot { border-color: rgb(var(--primary) / .5); color: rgb(var(--primary)); }
.tl-bounce .tl-dot { border-color: #FCA5A5; color: #DC2626; }
.tl-task_done .tl-dot, .tl-discovery .tl-dot { border-color: #86EFAC; color: #15803D; }
.tl-body { min-width: 0; flex: 1; font-size: .8125rem; }
.tl-top { display: flex; gap: .5rem; align-items: baseline; justify-content: space-between; }
.tl-top b { font-weight: 600; }
.tl-time { flex: none; font-size: 11px; color: rgb(var(--muted)); font-variant-numeric: tabular-nums; }
.tl-subj { color: rgb(var(--text)); font-weight: 500; }
.tl-text { color: rgb(var(--muted)); white-space: pre-line; overflow-wrap: anywhere; margin-top: .1rem; }
.tl-text.tl-note { color: rgb(var(--text)); background: rgb(var(--primary) / .05); border: 1px solid rgb(var(--primary) / .14); border-radius: .5rem; padding: .4rem .6rem; }
.tl-by { font-size: 11px; color: rgb(var(--muted)); margin-top: .1rem; }
.people { list-style: none; margin: 0 0 .5rem; padding: 0; }
.people > li + li { border-top: 1px solid rgb(var(--border) / .7); }
.person > summary { display: flex; align-items: center; gap: .6rem; padding: .5rem 0; cursor: pointer; list-style: none; }
.person > summary::-webkit-details-marker { display: none; }
.person .role { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: rgb(var(--accent)); margin-left: .25rem; }
.soc-mini { display: flex; flex-wrap: wrap; gap: .4rem; font-size: 11px; margin-top: .1rem; }
.soc-mini a { color: rgb(var(--primary)); }
.person-form { display: flex; flex-direction: column; gap: .45rem; padding: .25rem 0 .75rem; }
.add-person > summary { list-style: none; display: inline-flex; cursor: pointer; }
.add-person > summary::-webkit-details-marker { display: none; }
.add-person[open] > summary { margin-bottom: .5rem; }
.disc-wait { display: flex; align-items: center; gap: .5rem; font-size: .875rem; font-weight: 600; color: rgb(var(--primary)); }
.disc-list { list-style: none; margin: 0 0 .5rem; padding: 0; }
.disc-list li { display: flex; align-items: center; gap: .5rem; padding: .3rem 0; font-size: .8125rem; border-bottom: 1px dashed rgb(var(--border) / .8); }
.disc-list li:last-child { border-bottom: 0; }
.disc-list svg { color: rgb(var(--primary)); vertical-align: -2px; }
.soc-row { display: flex; flex-wrap: wrap; gap: .35rem; }
.soc-chip { display: inline-flex; align-items: center; gap: .35rem; max-width: 100%; padding: .2rem .55rem; border-radius: 999px; font-size: 11.5px; font-weight: 600; color: rgb(var(--primary)); background: rgb(var(--primary) / .07); border: 1px solid rgb(var(--primary) / .16); }
.soc-chip .trunc { max-width: 9rem; font-weight: 400; color: rgb(var(--muted)); }
.task-list { list-style: none; margin: 0 0 .6rem; padding: 0; }
.task-list li { display: flex; align-items: flex-start; gap: .55rem; padding: .45rem 0; font-size: .8125rem; border-bottom: 1px solid rgb(var(--border) / .6); }
.task-list li.task-late { background: linear-gradient(90deg, rgb(220 38 38 / .06), transparent); }
.task-check { display: grid; place-items: center; width: 1.2rem; height: 1.2rem; margin-top: .05rem; border-radius: .35rem; border: 1.5px solid rgb(var(--border)); color: transparent; background: transparent; }
.task-check:hover { border-color: rgb(var(--primary)); color: rgb(var(--primary) / .6); }
.task-check.on { background: rgb(var(--primary)); border-color: rgb(var(--primary)); color: #fff; }
.task-form { display: flex; flex-direction: column; gap: .4rem; }
.task-form .flex > input[type=date] { flex: 1; min-width: 0; }
.task-form select { width: 5.5rem; }
tr.task-late > td:first-child { box-shadow: inset 3px 0 0 #DC2626; }
.dark .chip { color: #D8B4FE; background: rgb(168 85 247 / .16); }
.dark .task-list li.task-late { background: linear-gradient(90deg, rgb(248 113 113 / .1), transparent); }
.dark .stars { color: rgb(255 255 255 / .2); }
@media (max-width: 639.98px) {
  .add-site { width: 100%; } .add-site .tb-search { flex: 1; min-width: 0; }
  .rec-meta { width: 100%; justify-content: space-between; }
  .note-form { flex-direction: column; align-items: stretch; }
}
/* utilities used by Websites / Tasks (app.css is hand-maintained, so they live here) */
.w-\[3rem\] { width: 3rem; } .w-\[8rem\] { width: 8rem; } .w-\[9rem\] { width: 9rem; } .w-\[10\.5rem\] { width: 10.5rem; }
.w-\[13\%\] { width: 13%; } .w-\[24\%\] { width: 24%; }
.min-w-\[46rem\] { min-width: 46rem; } .min-w-\[64rem\] { min-width: 64rem; }
.toolbar select.tb-sel { width: auto; flex: none; min-width: 8.5rem; max-width: 11rem; }
.add-site .tb-search { position: relative; }
.add-site .tb-search .input { padding-left: 2rem; }
.add-site .tb-search svg { position: absolute; left: .6rem; top: 50%; transform: translateY(-50%); color: rgb(var(--muted)); pointer-events: none; }
.trunc svg, .chip svg, .disc-list svg, .tl-text svg { display: inline-block; vertical-align: -2px; }
.task-form .flex > input[type=date] { min-width: 9rem; }
.task-form select { width: 4.75rem; flex: none; }
.dark .tl-dot { color: rgb(var(--text) / .8); }
@media (max-width: 639.98px) { .toolbar select.tb-sel { flex: 1 1 45%; max-width: none; } }
@media (max-width: 639.98px) { .tbl.tbl-stack td.mob-hide { display: none !important; } }
.task-form .flex > input[type=date] { flex: 1 1 auto; min-width: 0; }
.task-form select { width: 5.75rem; }
.task-late .task-check { border-color: #F87171; }

/* ===== App-style in-place updates (phase 2b) ===== */
#pp-page { display: contents; }
/* top progress bar: page changes only, pink → purple */
#hx-bar { background: linear-gradient(90deg, rgb(var(--primary)), rgb(var(--accent))); height: 2px; box-shadow: 0 0 8px rgb(var(--primary) / .45); }
html.hx-busy { cursor: default; }
/* small inline busy state on the clicked button */
.is-busy { position: relative; pointer-events: none; opacity: .75; }
.is-busy::after { content: ""; display: inline-block; width: .8em; height: .8em; margin-left: .4em; vertical-align: -1px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 999px; animation: pp-spin .7s linear infinite; }
.star-pick .is-busy::after, .task-check.is-busy::after, .chip-rm.is-busy::after { display: none; }
.htmx-request.star-pick, .htmx-request .task-check { opacity: .8; }
.opt-gone { display: none !important; }
/* toasts raised by in-place actions */
#pp-toasts { position: fixed; top: .75rem; right: .75rem; z-index: 95; display: flex; flex-direction: column; gap: .5rem; max-width: min(24rem, calc(100vw - 1.5rem)); pointer-events: none; }
.pp-toast { pointer-events: auto; display: flex; align-items: center; gap: .6rem; padding: .65rem .8rem .65rem 1rem; border-radius: .8rem; font-size: .875rem; background: rgb(var(--elevated)); border: 1px solid rgb(var(--border)); box-shadow: var(--shadow); color: rgb(var(--text)); transition: opacity .3s; animation: pp-toast-in .18s ease-out; }
.pp-toast-success { border-color: rgb(22 163 74 / .35); }
.pp-toast-success::before, .pp-toast-danger::before, .pp-toast-warning::before, .pp-toast-info::before { content: ""; flex: none; width: .5rem; height: .5rem; border-radius: 999px; background: #16A34A; }
.pp-toast-danger { border-color: rgb(220 38 38 / .4); color: #B91C1C; }
.pp-toast-danger::before { background: #DC2626; }
.pp-toast-warning { border-color: rgb(217 119 6 / .4); }
.pp-toast-warning::before { background: #D97706; }
.pp-toast-info::before { background: rgb(var(--accent)); }
.pp-toast-undo { font-weight: 700; color: rgb(var(--primary)); padding: .1rem .4rem; border-radius: .4rem; }
.pp-toast-undo:hover { background: rgb(var(--primary) / .08); }
.pp-toast-x { opacity: .55; font-size: 1.1rem; line-height: 1; padding: 0 .2rem; }
.pp-toast-x:hover { opacity: 1; }
@keyframes pp-toast-in { from { opacity: 0; transform: translateY(-4px); } }
.dark .pp-toast-danger { color: #FCA5A5; }
@media (max-width: 639.98px) { #pp-toasts { left: .75rem; right: .75rem; max-width: none; top: auto; bottom: .75rem; } }
/* record page: tags with remove buttons, add-a-tag box */
.chip-x { gap: .15rem; padding-right: .2rem; max-width: 12rem; }
.chip-x > span { overflow: hidden; text-overflow: ellipsis; }
.chip-rm { display: inline-grid; place-items: center; width: 1rem; height: 1rem; border-radius: 999px; color: inherit; opacity: .6; }
.chip-rm:hover { opacity: 1; background: rgb(var(--accent) / .18); }
.tag-add { display: inline-flex; gap: .35rem; align-items: center; }
.tag-row .tag-add .input { width: 12rem; }
/* deal: little "Saved" tick */
.saved-tick { display: inline-flex; align-items: center; gap: .25rem; font-size: 11px; font-weight: 600; color: #16A34A; opacity: 0; transition: opacity .25s; }
.saved-tick.show { opacity: 1; animation: pp-saved 2.4s ease forwards; }
@keyframes pp-saved { 0%, 70% { opacity: 1; } 100% { opacity: 0; } }
.dark .saved-tick { color: #4ADE80; }
/* compose: plain error with Try again */
.compose-err { display: flex; align-items: center; gap: .6rem; padding: .6rem .75rem; border-radius: .6rem; font-size: .8125rem; color: #B91C1C; background: rgb(220 38 38 / .06); border: 1px solid rgb(220 38 38 / .25); }
.compose-err svg { flex: none; }
.dark .compose-err { color: #FCA5A5; background: rgb(248 113 113 / .08); border-color: rgb(248 113 113 / .3); }
/* tasks: done style follows the li (so the optimistic tick looks right at once) */
.task-list li.is-done .task-title { text-decoration: line-through; color: rgb(var(--muted)); }
.ws-meta { display: inline-flex; align-items: center; gap: .5rem; }
#ws-results.htmx-request, #ws-results.is-loading { opacity: .6; transition: opacity .15s; }
#toasts { pointer-events: none; }
#toasts > * { pointer-events: auto; }
@media (max-width: 639.98px) { #toasts { top: auto; bottom: .75rem; } }

/* ---------- Pictures inside received emails (inbox thread) ---------- */
/* Email tables are layout boxes: no lines around them unless the email itself drew lines (border="1"). */
.email-html td, .email-html th { border: 0; }
.email-html table[border]:not([border="0"]) > * > tr > td,
.email-html table[border]:not([border="0"]) > * > tr > th { border: 1px solid rgb(0 0 0 / .12); }
.dark .email-html table[border]:not([border="0"]) > * > tr > td,
.dark .email-html table[border]:not([border="0"]) > * > tr > th { border-color: rgb(255 255 255 / .14); }
.email-html img { max-width: 100%; height: auto; border: 0; display: inline-block; vertical-align: middle; }
/* A picture that can't load is removed cleanly: no empty frame, no broken-picture icon. */
.email-html img.pp-img-off { display: none !important; }
