/* Inspections: home, the inspection sheet, finish and done.
 *
 * Laid out for a landscape tablet (Surface, 1368 x 912 CSS px and up): a
 * section sidebar beside one long scrolling sheet. Below 900 px the sidebar
 * folds away and the sheet runs full width; it works on a phone but isn't
 * tuned for one. Touch targets are 48 px or more, for gloves and pens.
 */

/* ── wider pages ─────────────────────────────────────────────────────── */
.wrap { max-width: 72rem; padding: 1.25rem 1.5rem calc(3rem + var(--safe-bottom)); }
.app-bar-main { max-width: none; padding: 0.85rem 1.5rem 0.55rem; }
body[data-view="inspect"] .wrap { max-width: none; padding-top: 0; }
body { background-image:
  radial-gradient(120% 50% at 50% -10%, rgb(var(--accent-rgb) / 0.10), transparent 60%),
  linear-gradient(var(--color-grid) 1px, transparent 1px),
  linear-gradient(90deg, var(--color-grid) 1px, transparent 1px); }
.hazard { background: repeating-linear-gradient(-45deg, var(--color-accent) 0 8px, #f4f4f4 8px 16px); }
.brand-name { text-shadow: 2px 2px 0 var(--color-accent-deep), 4px 4px 0 rgb(0 0 0 / 0.45); }
.brand-tag { color: #ff8f86; }
.net-banner { display: flex; align-items: center; justify-content: center; gap: 0.5rem; color: #1b1500; }
.net-banner .icon { width: 1.2em; height: 1.2em; }
h1 { font-size: clamp(1.6rem, 2.6vw, 2.2rem); }
h2 { margin: 0; }

.save-state {
  margin-left: auto; padding: 0.3rem 0.7rem; border-radius: 999px;
  font-family: var(--font-data); font-size: 0.75rem; color: var(--color-text-dim);
  border: 1px solid var(--color-border); white-space: nowrap;
}
.save-state[data-mode="saved"]::before { content: "● "; color: var(--color-ok); }
.save-state[data-mode="pending"]::before { content: "● "; color: var(--status-partial); }
.save-state[data-mode="error"] { color: var(--color-danger); border-color: var(--color-danger); }
.save-state:empty { display: none; }
.save-state + .app-bar-actions { margin-left: 0.6rem; }

/* ── home ────────────────────────────────────────────────────────────── */
.home-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem; margin: 0.5rem 0 1rem; }
.home-top .lede { margin-bottom: 0; }
.home-gus { flex: none; }
.machine-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 30rem), 1fr)); gap: 1rem; margin: 0 0 2rem; padding: 0; list-style: none; }
.machine-card {
  display: grid; grid-template-columns: 1fr; width: 100%; padding: 0; overflow: hidden; text-align: left;
  border: 1.5px solid var(--color-border); border-radius: var(--radius); cursor: pointer;
  background: linear-gradient(180deg, #f6f6f4, #e6e7e8 70%, var(--color-surface) 70%);
  color: var(--color-text); font: inherit; box-shadow: var(--shadow);
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.machine-card:hover { border-color: var(--color-accent); box-shadow: 0 0 0 3px rgb(var(--accent-rgb) / 0.25), var(--shadow); }
.machine-card:active { transform: scale(0.99); }
.machine-img { display: block; width: 100%; aspect-ratio: 835 / 360; object-fit: contain; background: #f6f6f4; }
.machine-text { display: grid; gap: 0.1rem; padding: 0.9rem 1.1rem 0.2rem; background: var(--color-surface); }
.machine-make { font-family: var(--font-data); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: #ff8f86; }
.machine-model { font-family: var(--font-data); font-size: 1.6rem; font-weight: 700; letter-spacing: 0.06em; }
.machine-desc { color: var(--color-text-dim); }
.machine-meta { font-family: var(--font-data); font-size: 0.78rem; color: var(--color-text-dim); }
.machine-go {
  display: flex; align-items: center; gap: 0.5rem; justify-self: start; margin: 0.6rem 1.1rem 1rem;
  padding: 0.6rem 1.1rem; border-radius: 999px; background: var(--color-accent); color: #fff; font-weight: 700;
}

.home-block { margin: 0 0 2rem; }
.list-heading { margin: 0 0 0.6rem; font-family: var(--font-data); font-size: 0.8rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--color-text-dim); }
.list-heading-row { display: flex; align-items: baseline; gap: 1rem; flex-wrap: wrap; }
.list-heading-row .hint { margin: 0 0 0.6rem; }
.row-list { display: grid; gap: 0.6rem; margin: 0; padding: 0; list-style: none; }
.row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 0.5rem 1rem;
  padding: 0.85rem 1rem; border: 1px solid var(--color-border); border-radius: var(--radius-sm); background: var(--color-surface);
}
.row-main { min-width: 0; }
.row-title { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; margin: 0; font-weight: 700; }
.row-meta { margin: 0.15rem 0 0; font-size: 0.88rem; color: var(--color-text-dim); }
.row-status { margin: 0.2rem 0 0; font-size: 0.88rem; font-weight: 700; color: var(--color-danger); }
.row-status:empty { display: none; }
.row-actions { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; justify-content: flex-end; }
.row-actions .btn .icon { width: 1.1em; height: 1.1em; }
.row-email { grid-column: 1 / -1; max-width: 34rem; }
.pill { padding: 0.05rem 0.5rem; border-radius: 999px; font-family: var(--font-data); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.04em; border: 1px solid var(--color-border); color: var(--color-text-dim); }
.pill-fail, .pill-not_approved { background: rgb(224 53 43 / 0.16); border-color: var(--status-fail); color: #ffb4ad; }
.pill-approved { background: rgb(34 163 90 / 0.16); border-color: var(--status-pass); color: #9be8bb; }
.pill-conditional, .pill-diagnosis { background: rgb(240 160 32 / 0.14); border-color: var(--status-partial); color: #ffd58f; }
.progress { height: 6px; border-radius: 999px; background: var(--color-bg-deep); overflow: hidden; }
.progress span { display: block; height: 100%; width: 0; background: var(--color-accent); border-radius: inherit; transition: width 0.3s ease; }
.progress-sm { margin-top: 0.45rem; max-width: 20rem; }

/* ── inspection layout ───────────────────────────────────────────────── */
.screen-inspect:not([hidden]) {
  display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); gap: 1.5rem; align-items: start;
}
.side {
  position: sticky; top: calc(var(--bar-h) + 0.75rem); max-height: calc(100dvh - var(--bar-h) - 1.5rem);
  display: flex; flex-direction: column; gap: 0.75rem; margin-top: 1.25rem; padding: 1rem 0.75rem 0.9rem;
  border: 1px solid var(--color-border); border-radius: var(--radius); background: var(--color-surface);
}
.side-head { padding: 0 0.35rem; }
.side-head .eyebrow { color: #ff8f86; }
.side-head .progress { margin: 0.6rem 0 0.35rem; height: 8px; }
.side-count { margin: 0; font-family: var(--font-data); font-size: 0.8rem; color: var(--color-text-dim); }
.side-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; margin: 0; padding: 0; list-style: none; overscroll-behavior: contain; }
.side-link {
  display: grid; grid-template-columns: 2rem minmax(0, 1fr) auto; align-items: center; gap: 0.4rem;
  min-height: 44px; padding: 0.3rem 0.45rem; border-radius: 8px; color: var(--color-text); text-decoration: none; font-size: 0.92rem;
}
.side-link:hover { background: var(--color-surface-2); }
.side-link.is-current { background: rgb(var(--accent-rgb) / 0.16); box-shadow: inset 3px 0 0 var(--color-accent); }
.side-num { font-family: var(--font-data); font-size: 0.75rem; color: var(--color-text-dim); text-align: center; }
.side-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-badge { min-width: 1.6rem; padding: 0 0.35rem; border-radius: 999px; font-family: var(--font-data); font-size: 0.7rem; font-weight: 700; text-align: center; color: var(--color-text-dim); }
.side-badge:empty { padding: 0; min-width: 0.6rem; height: 0.6rem; border: 1.5px solid var(--color-border); }
.side-badge[data-state="partial"] { color: #ffd58f; }
.side-badge[data-state="partial"]:empty { border-color: var(--status-partial); }
.side-badge[data-state="done"] { color: #9be8bb; }
.side-badge[data-state="done"]:empty { background: var(--status-pass); border-color: var(--status-pass); }
.side-badge[data-state="fail"] { background: var(--status-fail); color: #fff; }

.sheet { min-width: 0; padding-top: 1.25rem; }
.sheet-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 0.75rem; }
.sheet-head h1 { margin-bottom: 0; }

@media (max-width: 900px) {
  .screen-inspect:not([hidden]) { grid-template-columns: 1fr; }
  .side { position: static; max-height: none; order: 2; }
  .side-list { display: none; }
}

/* ── diagram ─────────────────────────────────────────────────────────── */
.diagram-card { padding: 0.5rem 0.5rem 0.6rem; background: #f4f4f2; border-color: #c8cacd; }
.diagram { width: 100%; }
.diagram-svg { display: block; width: 100%; height: auto; max-height: 56vh; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.dg-part {
  fill: rgb(var(--accent-rgb) / 0.06); stroke: #6c7684; stroke-width: 1.6; stroke-dasharray: 5 3;
  cursor: pointer; transition: fill 0.15s ease, stroke 0.15s ease;
}
.dg-part[data-state="partial"] { stroke: var(--status-partial); fill: rgb(240 160 32 / 0.12); }
.dg-part[data-state="done"] { stroke: var(--status-pass); fill: rgb(34 163 90 / 0.14); stroke-dasharray: none; }
.dg-part[data-state="fail"] { stroke: var(--status-fail); fill: rgb(224 53 43 / 0.18); stroke-dasharray: none; }
.dg-part:hover, .dg-part.is-hover { fill: rgb(var(--accent-rgb) / 0.26); stroke-width: 2.4; }
.dg-part.is-current { stroke-width: 2.8; filter: drop-shadow(0 0 3px rgb(var(--accent-rgb) / 0.55)); }
.dg-leader { stroke: #5d6570; stroke-width: 1.3; pointer-events: none; }
.dg-dot { fill: #5d6570; pointer-events: none; }
.dg-leader[data-state="fail"], .dg-dot[data-state="fail"] { stroke: var(--status-fail); fill: var(--status-fail); }
.dg-leader[data-state="done"], .dg-dot[data-state="done"] { stroke: var(--status-pass); fill: var(--status-pass); }
.dg-callout { cursor: pointer; outline: none; }
.dg-box { fill: #fff; stroke: #5d6570; stroke-width: 1.4; transition: fill 0.15s ease; }
.dg-label { font: 700 11px var(--font-prose); fill: #15171a; pointer-events: none; }
.dg-callout[data-state="partial"] .dg-box { stroke: var(--status-partial); stroke-width: 2; }
.dg-callout[data-state="done"] .dg-box { stroke: var(--status-pass); stroke-width: 2; fill: #eaf7ef; }
.dg-callout[data-state="fail"] .dg-box { stroke: var(--status-fail); stroke-width: 2.2; fill: #fde9e7; }
.dg-callout:hover .dg-box, .dg-callout.is-hover .dg-box, .dg-callout:focus-visible .dg-box { fill: #ffe3e0; stroke: var(--color-accent); }
.dg-callout.is-current .dg-box { stroke: var(--color-accent); stroke-width: 2.6; }
.dg-callout:focus-visible .dg-box { stroke-width: 3; }
.diagram-legend { display: flex; flex-wrap: wrap; gap: 0.4rem 1.1rem; padding: 0.25rem 0.5rem 0; font-size: 0.8rem; color: #3b4048; }
.lg { display: inline-block; width: 0.9rem; height: 0.9rem; margin-right: 0.35rem; vertical-align: -0.12rem; border-radius: 3px; border: 2px dashed #6c7684; }
.lg-partial { border: 2px dashed var(--status-partial); }
.lg-done { border: 2px solid var(--status-pass); background: rgb(34 163 90 / 0.2); }
.lg-fail { border: 2px solid var(--status-fail); background: rgb(224 53 43 / 0.2); }
.diagram-note { margin-left: auto; font-style: italic; }

/* ── section cards ───────────────────────────────────────────────────── */
.sec-card { padding: 0 1.1rem 0.9rem; scroll-margin-top: calc(var(--bar-h) + 0.75rem); }
.sec-card.flash { animation: flash 1.2s ease; }
@keyframes flash { 0% { box-shadow: 0 0 0 4px rgb(var(--accent-rgb) / 0.7), var(--shadow); } 100% { box-shadow: var(--shadow); } }
.sec-head {
  display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap;
  margin: 0 -1.1rem 0.9rem; padding: 0.75rem 1.1rem; border-bottom: 1px solid var(--color-border);
  background: linear-gradient(90deg, rgb(var(--accent-rgb) / 0.12), transparent 55%); border-radius: var(--radius) var(--radius) 0 0;
}
.sec-num {
  display: grid; place-items: center; min-width: 2.4rem; height: 2.4rem; padding: 0 0.4rem; border-radius: 8px;
  background: var(--color-accent); color: #fff; font-family: var(--font-data); font-weight: 700; font-size: 0.95rem;
}
.sec-titles { flex: 1 1 16rem; min-width: 0; }
.sec-title { font-size: 1.15rem; line-height: 1.25; }
.sec-title:focus { outline: none; }
.sec-sub { margin: 0.1rem 0 0; font-size: 0.86rem; color: var(--color-text-dim); }
.sec-count { font-family: var(--font-data); font-size: 0.85rem; font-weight: 700; color: var(--color-text-dim); }
.sec-count[data-state="done"] { color: #9be8bb; }
.sec-count[data-state="fail"] { color: #ffb4ad; }
.pass-rest .icon { width: 1.1em; height: 1.1em; }
.grid-2, .grid-3 { display: grid; gap: 0 1rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
.sec-fields { margin-bottom: 0.5rem; padding-bottom: 0.4rem; border-bottom: 1px dashed var(--color-border); }
.seg-field { margin: 0 0 0.6rem; padding: 0; border: 0; min-width: 0; }
.seg-field legend { margin-bottom: 0.35rem; font-weight: 700; font-size: 0.95rem; padding: 0; }
.segmented span { display: grid; place-items: center; min-height: var(--tap); padding: 0.3rem 0.8rem; border: 1.5px solid var(--color-border); border-radius: var(--radius-sm); text-align: center; font-weight: 700; cursor: pointer; }
.key { margin: 0.2rem 0; font-size: 0.85rem; }
.key-safety { font-weight: 700; color: #ffd58f; }
input[type="datetime-local"].input { color-scheme: dark; min-width: 0; }
.field-hint { margin: 0.25rem 0 0; font-size: 0.82rem; }

/* items */
.items { margin: 0; padding: 0; list-style: none; }
.item { border-bottom: 1px solid color-mix(in srgb, var(--color-border) 60%, transparent); }
.item:last-child { border-bottom: 0; }
.item-main { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 0.75rem; padding: 0.45rem 0; }
.item-label { font-size: 1rem; line-height: 1.35; }
.item[data-status="fail"] .item-label { color: #ffc9c4; font-weight: 700; }
.status-group { display: flex; gap: 0.35rem; }
.status {
  min-width: 4.6rem; min-height: 48px; padding: 0 0.6rem; border-radius: 10px; cursor: pointer;
  border: 1.5px solid var(--color-border); background: var(--color-bg-deep); color: var(--color-text-dim);
  font: 700 0.95rem var(--font-prose); touch-action: manipulation;
  transition: background-color 0.12s ease, border-color 0.12s ease, color 0.12s ease, transform 0.1s ease;
}
.status:active { transform: scale(0.95); }
.status:hover { border-color: var(--color-blueprint); color: var(--color-text); }
.status-pass[aria-checked="true"] { background: var(--status-pass); border-color: var(--status-pass); color: #fff; }
.status-fail[aria-checked="true"] { background: var(--status-fail); border-color: var(--status-fail); color: #fff; }
.status-na[aria-checked="true"] { background: var(--status-na); border-color: var(--status-na); color: #fff; }
.note-toggle {
  position: relative; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 10px; cursor: pointer;
  border: 1.5px solid var(--color-border); background: transparent; color: var(--color-text-dim);
}
.note-toggle[aria-expanded="true"] { border-color: var(--color-blueprint); color: var(--color-text); }
.note-toggle[data-has="1"]::after { content: ""; position: absolute; top: 7px; right: 7px; width: 8px; height: 8px; border-radius: 50%; background: var(--color-hivis); }
.note-toggle .icon { width: 22px; height: 22px; }
.item .note-field { padding: 0 0 0.6rem; }

/* notes with dictation and photos */
.note-field { margin: 0.2rem 0 0.4rem; }
.note-field > .label { display: block; margin-bottom: 0.3rem; font-weight: 700; font-size: 0.95rem; }
.note-row { display: flex; gap: 0.5rem; align-items: stretch; }
.note-area { flex: 1 1 auto; min-height: 3.2rem; line-height: 1.45; font-family: var(--font-prose); }
.note-tools { display: flex; flex-direction: column; gap: 0.35rem; }
.note-btn {
  --level: 0;
  display: flex; align-items: center; gap: 0.35rem; min-height: 44px; min-width: 6.2rem; padding: 0 0.7rem; border-radius: 10px; cursor: pointer;
  border: 1.5px solid var(--color-border); background: var(--color-surface-2); color: var(--color-text); font: 700 0.88rem var(--font-prose);
}
.note-btn .icon { width: 20px; height: 20px; }
.note-btn:hover:not(:disabled) { border-color: var(--color-blueprint); }
.note-btn:disabled { opacity: 0.6; cursor: default; }
.note-btn.mic[data-state="recording"] {
  background: #4a1512; border-color: var(--status-fail); color: #fff;
  box-shadow: 0 0 0 calc(2px + var(--level) * 10px) rgb(224 53 43 / 0.3); transition: box-shadow 0.08s linear;
}
.note-btn.mic[data-state="working"] .icon { animation: pulse 1s ease infinite; }
@keyframes pulse { 50% { opacity: 0.3; } }
body.is-offline .note-btn.mic { opacity: 0.55; }
.photo-refs { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.35rem; }
.photo-refs:empty { display: none; }
.photo-ref {
  display: inline-flex; align-items: center; gap: 0.4rem; min-height: 40px; padding: 0.2rem 0.65rem 0.2rem 0.2rem; border-radius: 8px; cursor: pointer;
  border: 1px solid var(--color-border); background: var(--color-bg-deep); color: var(--color-text); font: 700 0.82rem var(--font-data);
}
.photo-ref img { width: 34px; height: 34px; object-fit: cover; border-radius: 5px; }
.photo-ref:hover { border-color: var(--color-accent); }
.photo-ref.is-missing { padding: 0.4rem 0.6rem; color: var(--color-danger); cursor: default; }
.note-field .dictate-status { margin-top: 0.3rem; }
.note-field .dictate-status:empty { display: none; }

/* photos card */
#sec-photos .photo-grid { grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); }
.photo-tile.flash .photo-frame { animation: flash 1.2s ease; }
.photo-uses { margin: 0; font-size: 0.8rem; color: var(--color-text-dim); }

/* sign-off */
.sig-grid { gap: 1rem 1.5rem; }
.sig-title { margin: 0 0 0.4rem; font-size: 1rem; }
.sig-box {
  display: flex; align-items: center; justify-content: center; gap: 0.6rem; width: 100%; height: 120px; margin-bottom: 0.4rem;
  border: 2px dashed var(--color-border); border-radius: var(--radius-sm); background: #f7f7f5; color: #5d6570; cursor: pointer;
  font: 700 1rem var(--font-prose);
}
.sig-box:hover { border-color: var(--color-accent); }
.sig-box .icon { width: 30px; height: 30px; }
.sig-box[data-signed="1"] { border-style: solid; border-color: #c8cacd; }
.sig-box img { max-width: 92%; max-height: 104px; }
.sig-clear { min-height: 36px; padding: 0; margin-bottom: 0.3rem; }
.reference { margin: 0 0 2rem; font-size: 0.8rem; }

/* ── signature dialog ────────────────────────────────────────────────── */
dialog { color: var(--color-text); }
dialog::backdrop { background: rgb(0 0 0 / 0.6); }
.sig-dialog {
  width: min(56rem, 94vw); padding: 1.1rem 1.25rem 1rem; border: 1px solid var(--color-border); border-radius: var(--radius);
  background: var(--color-surface); box-shadow: var(--shadow);
}
.sig-head h2 { font-size: 1.2rem; }
.sig-head .hint { margin: 0.1rem 0 0.7rem; }
.sig-pad { position: relative; height: min(45vh, 320px); border-radius: var(--radius-sm); background: #fbfbf9; overflow: hidden; }
.sig-pad canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: crosshair; z-index: 1; }
.sig-line { position: absolute; left: 6%; right: 6%; bottom: 28%; border-bottom: 2px solid #b9bcc0; }
.sig-line span { position: absolute; left: -0.2rem; bottom: 0.2rem; font-size: 1.3rem; color: #9da1a6; }
.sig-name { position: absolute; left: 6%; bottom: 12%; margin: 0; font-size: 0.9rem; color: #6c7076; }
.sig-actions { display: flex; align-items: center; gap: 0.6rem; margin-top: 0.9rem; }
.sig-spacer { flex: 1; }
.confirm-dialog {
  width: min(30rem, 92vw); padding: 1.25rem; border: 1px solid var(--color-border); border-radius: var(--radius); background: var(--color-surface);
}
.confirm-dialog h2 { font-size: 1.15rem; margin-bottom: 0.4rem; }
.form-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-top: 1rem; }
.form-actions-split { justify-content: space-between; }

/* ── finish & done ───────────────────────────────────────────────────── */
.tally { display: grid; grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr)); gap: 0.6rem; margin: 0.5rem 0 1rem; }
.tally-cell {
  display: grid; justify-items: center; gap: 0.1rem; padding: 0.8rem; border: 1px solid var(--color-border); border-radius: var(--radius-sm);
  background: var(--color-surface); color: var(--color-text-dim); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em;
}
.tally-cell strong { font-family: var(--font-data); font-size: 1.8rem; color: var(--color-text); letter-spacing: 0; }
.tally-cell.is-pass strong { color: #6fdc9b; }
.tally-cell.is-fail strong { color: #ff8a80; }
.tally-cell.is-open strong { color: #ffd58f; }
.finish-card { padding-bottom: 0.9rem; }
.finish-card .card-title { float: none; margin-bottom: 0.4rem; }
.finish-list { margin: 0; padding-left: 1.1rem; display: grid; gap: 0.3rem; }
.finish-list .btn-link { padding: 0; font-size: 1rem; color: var(--color-text); }
.warn { color: #ffd58f; font-size: 0.9rem; }
.screen-done { text-align: left; }
.done-hero { display: flex; align-items: center; gap: 1.25rem; width: auto; margin: 0.5rem 0 1rem; text-align: left; }
.done-hero .lede { margin: 0; }
.done-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(22rem, 1fr)); gap: 1rem; }
.done-grid .card-title { float: none; }
.file-card { display: flex; align-items: center; gap: 0.9rem; flex-wrap: wrap; padding-bottom: 0.6rem; }
.file-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 12px; background: rgb(var(--accent-rgb) / 0.16); color: #ff8f86; }
.file-icon .icon { width: 28px; height: 28px; }
.file-text { display: grid; min-width: 0; flex: 1 1 12rem; overflow-wrap: anywhere; }
.file-actions { display: flex; gap: 0.5rem; }
