/* ---- Project Management: Done view, "Done & Dusted" (pm-view-done.js).
   Finished items grouped by month, as a grid of small poster cards. ---- */

#pm-done-main .pmv-dn-green { color: var(--accent); }

/* month sections: size and face come from headings.css; only layout here */
.pmv-dn-month { margin-top: 32px; }
.pmv-dn-month:first-of-type { margin-top: 0; }
.pmv-dn-head { display: flex; align-items: baseline; gap: 12px; margin: 0 0 16px; }
.pmv-dn-head small { flex: none; align-self: center; font-family: 'Plus Jakarta Sans', system-ui, sans-serif; white-space: nowrap; }
.pmv-dn-head::after { content: ""; flex: 1; align-self: center; height: 1px; background: var(--line); }
.pmv-dn-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 340px)); gap: 16px; }

/* one card: poster on top, dates and path below, Restore at the foot */
.pmv-dn-card { display: flex; flex-direction: column; min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--r-md, 14px); background: var(--surface); }
.pmv-dn-poster { position: relative; height: 96px; overflow: hidden; background: #070c18; }
.pmv-dn-vis, .pmv-dn-vis svg, .pmv-dn-art { position: absolute; inset: 0; width: 100%; height: 100%; }
.pmv-dn-vis svg, .pmv-dn-art { filter: saturate(.35) brightness(.8); }
/* fade the art on the left so the title reads */
.pmv-dn-poster::after { content: ""; position: absolute; inset: 0; background: var(--scrim, linear-gradient(90deg, rgba(7, 12, 24, .97) 0%, rgba(7, 12, 24, .85) 55%, rgba(7, 12, 24, .35) 100%)); }
.pmv-dn-in { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 4px; max-width: calc(100% - 44px); padding: 12px 16px; }
.pmv-dn-lab { overflow: hidden; color: var(--muted); font-size: var(--fs-cap, 11px); font-weight: 600; letter-spacing: .14em; text-transform: uppercase; text-overflow: ellipsis; white-space: nowrap; }
.pmv-dn-hd { display: -webkit-box; overflow: hidden; color: #fff; font-size: var(--fs-lead, 20px); line-height: 1.15; font-weight: 600; letter-spacing: -.015em; overflow-wrap: anywhere; text-wrap: balance; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.pmv-dn-ck { position: absolute; top: 12px; right: 12px; z-index: 1; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: #0b1324; font-size: 12px; font-weight: 700; }

.pmv-dn-body { display: flex; flex: 1; flex-direction: column; gap: 4px; padding: 12px 16px; color: var(--muted); font-size: var(--fs-meta, 13px); line-height: 18px; }
.pmv-dn-body b { color: var(--text); font-weight: 600; }
.pmv-dn-ontime { color: var(--accent); }
.pmv-dn-late { color: var(--danger); }
.pmv-dn-where { color: var(--muted); font-size: var(--fs-meta, 13px); overflow-wrap: anywhere; }
.pmv-dn-foot { display: flex; justify-content: flex-end; align-items: center; gap: 6px; padding: 0 12px 12px; }
/* trash: icon only, red on hover */
.pmv-dn-bin { width: 36px; height: 36px; }
.pmv-dn-bin svg { width: 16px; height: 16px; }
@media (hover: hover) { .pmv-dn-bin:hover { color: var(--danger); background: rgba(255, 77, 94, .1); } }
@media (max-width: 640px) { .pmv-dn-bin { width: 40px; height: 40px; } }
/* Restore: quiet secondary */
.pmv-dn-foot .btn { height: var(--btn-h-sm, 36px); border-color: var(--line); background: transparent; color: var(--muted); transition: color .15s, background .15s; }
@media (hover: hover) { .pmv-dn-foot .btn:hover { background: rgba(255, 255, 255, .06); color: var(--text); } }

/* nothing finished yet */
.pmv-dn-empty { padding: 36px 20px; border: 1px dashed var(--line); border-radius: var(--r-lg, 20px); color: var(--muted); text-align: center; }
.pmv-dn-empty b { display: block; margin-bottom: 8px; color: var(--text); font-family: var(--display); font-size: 32px; line-height: 1; font-weight: 400; letter-spacing: .01em; }
.pmv-dn-empty p { max-width: 46ch; margin: 0 auto; font-size: var(--fs-body, 14px); line-height: 22px; }

@media (max-width: 700px) {
  .pmv-dn-month { margin-top: 24px; }
  .pmv-dn-month:first-of-type { margin-top: 0; }
  .pmv-dn-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
}

/* Completed / Trash switch */
.pmv-dn-tabs { display: inline-flex; gap: 4px; margin: 0 0 24px; padding: 4px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.pmv-dn-tab { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 16px; border: 0; border-radius: 999px; background: none; color: var(--muted); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; transition: background .15s, color .15s; }
.pmv-dn-tab.on { background: var(--accent); color: #0e0f12; }
@media (hover: hover) { .pmv-dn-tab:not(.on):hover { color: var(--text); background: rgba(255, 255, 255, .05); } }
.pmv-dn-n { min-width: 20px; padding: 1px 6px; border-radius: 999px; background: rgba(255, 255, 255, .08); font-size: 11px; text-align: center; }
.pmv-dn-tab.on .pmv-dn-n { background: rgba(14, 15, 18, .18); }

/* Trash list */
.pmv-tr-wait { color: var(--muted); }
.pmv-tr-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 8px; }
.pmv-tr-head p { margin: 0; color: var(--muted); font-size: 13px; }
.pmv-tr-list { margin: 0; padding: 0; list-style: none; border: 1px solid var(--line); border-radius: var(--r-md, 14px); background: var(--surface); overflow: hidden; }
.pmv-tr-row { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 8px 12px 8px 16px; border-top: 1px solid var(--line); }
.pmv-tr-row:first-child { border-top: 0; }
.pmv-tr-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.pmv-tr-dot.k-task { background: var(--accent); }
.pmv-tr-dot.k-pin { background: #ffb547; }
.pmv-tr-dot.k-park { background: #9fb4ff; }
.pmv-tr-txt { display: flex; flex: 1; flex-direction: column; gap: 2px; min-width: 0; }
.pmv-tr-txt b { overflow: hidden; color: var(--text); font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.pmv-tr-txt small { color: var(--muted); font-size: 12px; }
.pmv-tr-row .btn { height: var(--btn-h-sm, 36px); border-color: var(--line); background: transparent; color: var(--muted); }
@media (hover: hover) { .pmv-tr-row .btn:hover { background: rgba(255, 255, 255, .06); color: var(--text); } }
@media (max-width: 640px) { .pmv-dn-tabs { display: flex; } .pmv-dn-tab { flex: 1; justify-content: center; } .pmv-tr-row { padding-left: 12px; gap: 8px; } }

/* older Completed tasks load a page at a time */
.pmv-dn-more { display: flex; justify-content: center; margin-top: 24px; }
