/* ─────────────────────────────────────────────────────────────────────
   Polish: one typeface, one type scale, quiet labels and strong values.
   Loaded last, so it refines every page without touching its layout code.
   ───────────────────────────────────────────────────────────────────── */
:root {
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", "Roboto Mono", Menlo, monospace;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 4px 16px rgba(15, 23, 42, .06);
}
body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  letter-spacing: -0.006em;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "cv11", "ss01";
}
h1 { font-size: 1.45rem; font-weight: 700; letter-spacing: -0.02em; }
h2, h3 { letter-spacing: -0.01em; }
/* Money and numbers line up in columns */
.dc-trow span:last-child, .dc-line-amt, .dc-job-amt, .dc-top-total strong, .appt-count, .appt-tile strong, .doc-num { font-variant-numeric: tabular-nums; }
.ro-mono, .vin-link, .doc-vin { font-family: var(--mono); letter-spacing: .02em; }

/* ── Documents: list on the left ── */
.docs-page { grid-template-columns: minmax(240px, 300px) minmax(0, 1fr); gap: 20px; }
.docs-page > .docs-side h1, .docs-side h2 { font-size: 1.25rem; }
.docs-side input[type=search], .docs-side input[type=text] { min-height: 44px; border-radius: 12px; padding: 0 14px; border: 1px solid var(--line); background: var(--panel); color: var(--text); }
.docs-list { gap: 6px; }
.doc-row { gap: 3px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); box-shadow: none; transition: border-color .12s, box-shadow .12s; }
.doc-row:hover { border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); }
.doc-row.on { border: 1px solid var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 22%, transparent); }
.doc-name { font-size: 15px; font-weight: 650; color: var(--text); letter-spacing: -0.01em; }
.doc-vehicle { font-size: 13px; color: var(--muted); opacity: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.doc-vin { font-size: 12px; }
.doc-foot { margin-top: 4px; }
.doc-num { font-size: 13px; font-weight: 700; color: var(--brand); }
.doc-kind { font-size: 11px; line-height: 20px; height: 20px; border-radius: 6px; padding: 0 7px; }
.doc-pill { font-size: 11.5px; padding: 1px 8px; border-radius: 999px; }

/* ── The document itself: layout follows the pane, not the screen ── */
.docs-pane { container-type: inline-size; container-name: doc; border: 0; padding: 0; }
.dc { gap: 14px; }
.dc-top { padding: 14px 18px; border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--line); background: var(--panel); }
.dc-kind { font-size: 1.2rem; font-weight: 700; letter-spacing: -0.02em; }
.dc-top-total span { font-size: 10.5px; font-weight: 600; letter-spacing: .08em; }
.dc-top-total strong { font-size: 1.6rem; font-weight: 700; letter-spacing: -0.02em; }
.dc-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; gap: 8px; box-shadow: var(--shadow); }
.dc-card-head h2 { font-size: 11px; font-weight: 600; letter-spacing: .09em; color: var(--muted); }
.dc-mini { min-height: 30px; padding: 2px 10px; font-size: 12.5px; font-weight: 600; border-radius: 8px; background: transparent; }
.dc-strong { font-size: 15.5px; font-weight: 650; letter-spacing: -0.01em; }
.dc-link { color: var(--brand); text-decoration: none; font-weight: 600; }
.dc-link:hover { text-decoration: underline; }
.dc-card a[href^="tel:"], .dc-card a[href^="mailto:"] { color: var(--text); text-decoration: none; font-weight: 500; }
.dc-card p { margin: 0; }
.dc-card .muted, .dc-card .tiny { font-size: 13px; color: var(--muted); }
.dc-trow { font-size: 14px; color: var(--muted); padding: 4px 0; }
.dc-trow span:last-child { color: var(--text); font-weight: 500; }
.dc-trow.strong { color: var(--text); font-weight: 650; }
.dc-trow.big { font-size: 1.15rem; color: var(--text); font-weight: 700; padding-top: 8px; }
.dc-trow.big span:last-child { font-weight: 700; }
.dc-job-title { font-weight: 650; font-size: 15px; }
.dc-line-desc { font-weight: 500; }
.dc-line-kind { font-size: 10.5px; font-weight: 700; letter-spacing: .06em; }
.dc-btn, .dc-bar-btn { font-weight: 650; letter-spacing: -0.005em; border-radius: 10px; }
.dc-chip { font-size: 11.5px; font-weight: 600; padding: 2px 10px; }

/* Narrow pane (document beside the list on a tablet): one column, customer & vehicle side by side */
.dc-grid { grid-template-columns: 1fr !important; }
.dc-side { position: static !important; }
.dc-two { grid-template-columns: 1fr 1fr; }
@container doc (min-width: 980px) {
  .dc-grid { grid-template-columns: minmax(0, 1fr) 320px !important; }
  .dc-side { position: sticky !important; top: 72px; }
}
@container doc (max-width: 520px) {
  .dc-two { grid-template-columns: 1fr; }
}

/* ── General: quieter headers, cleaner cards on every page ── */
h2 { color: var(--muted); }
.card, .appt-card, .insp-card, .job section { box-shadow: var(--shadow); }
.pill { font-weight: 600; }
.muted { color: var(--muted); }
input, select, textarea { font-family: var(--font); }

@media print { body { font-family: var(--font); } }

/* ── Records: search, then folders ── */
.rec-page { max-width: 1100px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.rec-head h1 { margin: 0; }
.rec-hint { color: var(--muted); font-size: 14px; margin: 4px 0; }
.rec-search { width: 100%; min-height: 56px; padding: 0 18px; font-size: 1.1rem; border-radius: 14px; border: 2px solid var(--line); background: var(--panel); color: var(--text); box-shadow: var(--shadow); }
.rec-search:focus { outline: none; border-color: var(--brand); }
.rec-results { display: flex; flex-direction: column; gap: 6px; }
.rec-hit { display: flex; align-items: center; gap: 12px; padding: 12px 14px; min-height: 56px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); color: var(--text); text-align: left; cursor: pointer; font: inherit; }
.rec-hit:hover { border-color: var(--brand); }
.rec-hit-icon { font-size: 1.4rem; }
.rec-hit-text { display: flex; flex-direction: column; min-width: 0; }
.rec-hit-text span { color: var(--muted); font-size: 13px; }
.rec-owner { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.rec-owner h2 { margin: 0; font-size: 1.35rem !important; color: var(--text) !important; text-transform: none !important; letter-spacing: -0.01em !important; }
.rec-link { border: 0; background: none; color: var(--brand); font: inherit; font-weight: 600; cursor: pointer; }
.rec-vehicle, .rec-visit { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); box-shadow: var(--shadow); }
.rec-vehicle > summary, .rec-visit > summary { display: flex; align-items: center; gap: 12px; padding: 14px 16px; cursor: pointer; list-style: none; min-height: 60px; }
.rec-vehicle > summary::-webkit-details-marker, .rec-visit > summary::-webkit-details-marker { display: none; }
.rec-folder { font-size: 1.5rem; }
.rec-sum-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.rec-sum-text strong { font-size: 1.05rem; font-weight: 650; }
.rec-sum-text span { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rec-badges { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.rec-visits { display: flex; flex-direction: column; gap: 8px; padding: 0 12px 12px; }
.rec-visit { box-shadow: none; background: var(--panel-2); }
.rec-visit[open] > summary { border-bottom: 1px solid var(--line); }
.rec-visit-body { padding: 10px 16px 16px; display: flex; flex-direction: column; gap: 14px; }
.rec-section h3 { margin: 0 0 6px; font-size: 11px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
.rec-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); margin-bottom: 6px; }
.rec-row-text { display: flex; flex-direction: column; flex: 1; min-width: 180px; }
.rec-row-text strong { font-weight: 600; }
.rec-row-text span { color: var(--muted); font-size: 13px; }
.rec-btn { min-height: 42px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel-2); color: var(--text); font: inherit; font-weight: 600; cursor: pointer; }
.rec-btn:hover { border-color: var(--brand); }
.rec-open { align-self: flex-start; min-height: 46px; padding: 0 18px; border-radius: 12px; border: 0; background: var(--brand); color: var(--on-brand); font: inherit; font-weight: 700; cursor: pointer; }
.rec-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin: 4px 0 8px; }
.rec-shot { margin: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--panel); }
.rec-shot.bad { border-color: var(--bad-line); }
.rec-shot img, .rec-shot video { width: 100%; height: 120px; object-fit: cover; display: block; background: #000; }
.rec-shot figcaption { padding: 6px 8px; font-size: 12.5px; }

/* Work plan photo slots */
.wp-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin: 6px 0 10px; }
.wp-slot { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 120px; border: 2px dashed var(--line); border-radius: 12px; background: var(--panel-2); cursor: pointer; overflow: hidden; text-align: center; }
.wp-slot:focus { outline: 3px solid var(--brand); }
.wp-slot.done { border-style: solid; border-color: var(--ok-line); }
.wp-slot img { width: 100%; height: 100px; object-fit: cover; }
.wp-slot strong { font-size: 13px; padding: 4px; }
.wp-plus { font-size: 28px; color: var(--muted); }

.wp-import { display: flex; flex-direction: column; gap: 8px; margin: 8px 0; }
.wp-import .row { display: flex; flex-wrap: wrap; gap: 8px; }
.wp-url { flex: 1 1 280px; min-height: 48px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); color: var(--text); font: inherit; }
.wp-pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.wp-pick { position: relative; padding: 0; border: 3px solid transparent; border-radius: 12px; overflow: hidden; background: #000; cursor: pointer; min-height: 110px; }
.wp-pick img { width: 100%; height: 110px; object-fit: cover; display: block; }
.wp-pick.busy { opacity: .5; }
.wp-pick.saved { border-color: var(--ok-line); }
.wp-pick-tag { position: absolute; left: 6px; bottom: 6px; padding: 2px 8px; border-radius: 999px; background: var(--ok-bg); color: var(--ok-fg); font-weight: 700; font-size: 12px; }

/* ── Customers: a directory, not a column of big cards ── */
.customers-page { max-width: 1200px; }
.cd { display: flex; flex-direction: column; gap: 10px; }
.cd-tools { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.cd-search { flex: 1 1 320px; min-height: 48px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); color: var(--text); font: inherit; font-size: 1rem; }
.cd-sorts { display: flex; gap: 4px; }
.cd-sort, .cd-letter, .cd-page { min-height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); color: var(--text); font: inherit; font-weight: 600; cursor: pointer; }
.cd-sort.on, .cd-letter.on { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.cd-letters { display: flex; flex-wrap: wrap; gap: 4px; }
.cd-letter { min-width: 40px; padding: 0 8px; }
.cd-table { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); overflow: hidden; box-shadow: var(--shadow); }
.cd-table.loading { opacity: .55; }
.cd-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1.2fr) minmax(0, 1.6fr) minmax(0, 1fr); gap: 12px; align-items: center; width: 100%; padding: 10px 16px; border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; min-height: 56px; }
.cd-row:last-child { border-bottom: 0; }
.cd-row:not(.cd-head):hover { background: var(--panel-2); }
.cd-head { cursor: default; min-height: 40px; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); background: var(--panel-2); }
.cd-name { display: flex; flex-direction: column; min-width: 0; }
.cd-name strong { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cd-name small, .cd-last small { color: var(--muted); font-size: 12px; }
.cd-phone, .cd-cars { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.cd-last { display: flex; flex-direction: column; font-variant-numeric: tabular-nums; }
.cd-muted { color: var(--muted); }
.cd-empty { padding: 18px; color: var(--muted); }
.cd-pager { display: flex; align-items: center; gap: 8px; justify-content: flex-end; color: var(--muted); }
.cd-page[disabled] { opacity: .4; cursor: default; }
@media (max-width: 700px) {
  .cd-row { grid-template-columns: minmax(0, 1fr) auto; }
  .cd-row .cd-cars, .cd-row .cd-last, .cd-head span:nth-child(3), .cd-head span:nth-child(4) { display: none; }
}

/* Customer page: contact card with edit */
.cust-contact { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); padding: 14px 16px; box-shadow: var(--shadow); margin: 8px 0 14px; }
.cust-contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.cust-contact-grid > div { display: flex; flex-direction: column; min-width: 0; }
.cust-contact-grid a { color: var(--text); text-decoration: none; font-weight: 500; overflow-wrap: anywhere; }
.cust-label { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.cust-edit { margin-top: 10px; }
.cust-edit > summary { min-height: 44px; display: inline-flex; align-items: center; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel-2); font-weight: 600; cursor: pointer; }
.cust-edit-form { margin-top: 12px; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px 14px; }
.cust-edit-form h2, .cust-edit-form button, .cust-edit-form .check-row, .cust-edit-form label:has(textarea) { grid-column: 1 / -1; }

/* Photo viewer on top of the page (Back closes it) */
.img-viewer { position: fixed; inset: 0; z-index: 1000; background: rgba(0,0,0,.86); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 12px; gap: 10px; }
.img-viewer-bar { display: flex; gap: 12px; align-items: center; justify-content: space-between; width: min(100%, 1100px); color: #fff; }
.img-viewer-bar button { font-size: 14px; }
.img-viewer img { max-width: min(100%, 1100px); max-height: calc(100vh - 80px); object-fit: contain; border-radius: 8px; background: #111; }

/* ── Normal sizes (Oct 2026): the Appointments, Inspections and Visit pages were
   sized for reading at arm's length. Pinch-zoom is there for anyone who needs it. ── */
:root, :root[data-theme] { font-size: 15px; }
.page .appts, .page .insp-page { font-size: 14px; }
.page .insp-page > header button, .page .appt-weeknav button { min-height: 36px; }
.page .insp-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.page .insp-card { padding: 10px 12px; gap: 4px; border-left-width: 4px; }
.page .insp-what { font-size: 14px; }
.page .insp-car { font-size: 13.5px; }
.page .insp-name { min-height: 30px; padding: 0 10px; font-size: 13.5px; font-weight: 650; border-width: 1px; border-radius: 8px; }
.page .insp-pick { font-size: 12px; }
.page .insp-pick select { min-height: 34px; font-size: 13.5px; border-radius: 8px; }
.page .insp-actions { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 6px; }
.page .insp-bar { height: 6px; }
.page .appt-days { gap: 4px; }
.page .appt-daybtn { min-height: 52px; padding: 4px 2px; border-width: 1px; border-radius: 10px; }
.page .appt-dayname { font-size: 11px; }
.page .appt-daynum { font-size: 17px; }
.page .appt-daycount { font-size: 11px; }
.page .appt-dayhead { font-size: 16px !important; margin: 10px 0 6px !important; }
.page .appt-tally { gap: 6px; margin-bottom: 10px; }
.page .appt-tile { min-height: 54px; border-width: 1px; border-radius: 10px; }
.page .appt-tile strong { font-size: 20px; }
.page .appt-tile span { font-size: 12.5px; font-weight: 650; }
.page .appt-lanes { gap: 10px; }
.page .appt-lane { padding: 8px; border-width: 1px; border-top-width: 4px; border-radius: 12px; }
.page .appt-lane-head { font-size: 14.5px !important; }
.page .appt-count { min-width: 26px; padding: 1px 8px; font-size: 12.5px; }
.page .appt-lane-hint { font-size: 12.5px; margin-bottom: 6px; }
.page .appt-empty.big { font-size: 13.5px; padding: 14px; border-width: 1px; }
.page .appt-card { padding: 10px 12px; margin-bottom: 8px; }
.page .appt-card .appt-name, .page .appt-name { font-size: 14.5px; }
.page .appt-time { font-size: 15px; }
.page .appt-primary { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 6px; margin-top: 8px; }
.page .appt-big { min-height: 36px; padding: 0 10px; font-size: 13px; font-weight: 700; border-width: 1px; border-radius: 9px; }
.page .appt-call { min-height: 32px; padding: 2px 10px; border-width: 1px !important; font-size: 13px; font-weight: 700; }
.page .appt-actions button { min-height: 34px; padding: 0 10px; font-size: 13px; }
.page .appt-more > summary { min-height: 32px; font-size: 13px; }
.page .pill { font-size: 11.5px; padding: 1px 8px; }
.page .veh-pick { min-height: 44px; padding: 6px 12px; border-width: 1px; }
.page .veh-pick strong { font-size: 14px; }
/* Visit page */
.page .visit-head h1 { font-size: 1.3rem; font-weight: 750; }
.page .visit-head .who { padding: 10px 12px; }
.page .job-tabs button { font-size: 13.5px; min-height: 34px; padding: 0 12px; }
.page .visit-inspections .insp-go { font-size: 14px; padding: 7px 14px; }
.page .visit-inspections .insp-card { padding: 10px; }
.id-redact-notice { margin: 0 0 12px; padding: 10px 12px; border: 1px solid var(--warn-line); background: var(--warn-bg); color: var(--warn-fg); border-radius: 10px; font-size: 13.5px; }
.id-redact-notice p { margin: 0 0 8px; }

/* Messages: plain texting, like a phone */
.ibx { font-size: 14px; }
.ibx-side { display: none; }
@media (min-width: 1600px) { .ibx { grid-template-columns: minmax(280px, 340px) minmax(0, 1fr) minmax(240px, 300px); } .ibx-side { display: block; } }
@media (min-width: 821px) and (max-width: 1599px) { .ibx { grid-template-columns: minmax(260px, 320px) minmax(0, 1fr); } }
.ibx-thread-head { display: flex; align-items: center; gap: 10px; flex-wrap: nowrap; padding: 8px 12px; min-height: 0; }
.ibx-thread-who { min-width: 0; display: flex; flex-direction: column; flex: 1 1 auto; }
.ibx-thread-who .ibx-name.big { font-size: 15px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ibx-thread-actions { display: flex; gap: 6px; flex: 0 0 auto; }
.ibx-thread-actions button { min-height: 30px; font-size: 12.5px; padding: 0 10px; }
.ibx-bubble { font-size: 14px; line-height: 1.4; }
.ibx-auto { all: unset; box-sizing: border-box; align-self: center; display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 8px; max-width: 92%; margin: 4px auto; padding: 4px 12px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); color: var(--muted); font-size: 12.5px; cursor: pointer; text-align: center; }
.ibx-auto:hover { color: var(--text); }
.ibx-auto.failed { border-color: var(--bad-line); color: var(--bad-fg); background: var(--bad-bg); }
.ibx-auto-meta { opacity: .8; }
.ibx-compose textarea { font-size: 14px; min-height: 40px; }
.ibx-send button { min-height: 36px; font-size: 13px; }
.ibx-more > summary { cursor: pointer; font-size: 12.5px; color: var(--muted); padding: 4px 2px; list-style: none; }
.ibx-more > summary::-webkit-details-marker { display: none; }
.ibx-more[open] > summary { color: var(--text); }
.ibx-qr { min-height: 28px; font-size: 12px; }
.ibx-row { min-height: 0; padding: 8px 10px; }
.ibx-avatar { width: 32px; height: 32px; font-size: 12px; }

/* Customer file: folders */
.cust-actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0 14px; }
.cust-actions button { min-height: 38px; font-size: 14px; }
.cf { margin-top: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); overflow: hidden; }
.cf-tabs { display: flex; gap: 2px; overflow-x: auto; padding: 6px; border-bottom: 1px solid var(--line); background: var(--panel-2); scrollbar-width: thin; }
.cf-tab { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 12px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font: inherit; font-size: 13.5px; font-weight: 650; cursor: pointer; }
.cf-tab.on { background: var(--panel); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.cf-n { min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--line); color: var(--text); font-size: 11.5px; line-height: 18px; text-align: center; }
.cf-body { padding: 10px 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.cf-empty { color: var(--muted); margin: 10px 2px; }
.cf-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px 12px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); }
.cf-main { all: unset; cursor: pointer; display: flex; flex-direction: column; min-width: 0; }
div.cf-main { cursor: default; }
.cf-main strong { font-size: 14px; font-weight: 650; }
.cf-main span { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cf-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.cf-btn { min-height: 30px; padding: 0 10px; font-size: 12.5px; border-radius: 8px; }
@media (max-width: 640px) { .cf-row { grid-template-columns: 1fr auto; } .cf-actions { grid-column: 1 / -1; justify-content: flex-start; } }
.cf-folder { border: 1px solid var(--line); border-radius: 10px; background: var(--bg); }
.cf-folder > summary { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; padding: 9px 12px; cursor: pointer; font-size: 14px; }
.cf-folder > summary .muted { font-size: 12.5px; }
.cf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; padding: 8px 12px 12px; }
.cf-shot { margin: 0; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); background: var(--panel-2); }
.cf-shot.bad { border-color: var(--bad-line); }
.cf-shot img, .cf-shot video { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; cursor: zoom-in; }
.cf-shot figcaption { padding: 4px 6px; font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cf-block { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--bg); }
.cf-block-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.cf-block-head button { margin-left: auto; }
/* Reminders folder */
.rem-list { display: flex; flex-direction: column; gap: 6px; }
.rem-row { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-left-width: 4px; border-radius: 10px; background: var(--bg); }
.rem-row.ok { border-left-color: var(--ok-line); }
.rem-row.warn { border-left-color: var(--warn-line); }
.rem-row.bad { border-left-color: var(--bad-line); }
.rem-icon { font-size: 18px; text-align: center; }
.rem-text { display: flex; flex-direction: column; min-width: 0; }
.rem-text strong { font-size: 14px; }
.rem-text span { font-size: 12.5px; color: var(--muted); }
.rem-actions { display: flex; gap: 6px; }
.rem-actions button { min-height: 30px; font-size: 12.5px; padding: 0 10px; }
.rem-settings { margin-top: 10px; font-size: 13px; }
.rem-settings > summary { cursor: pointer; color: var(--muted); }

/* Document viewer (reports, forms, invoices) on the page */
.pdf-viewer { position: fixed; inset: 0; z-index: 1000; display: flex; flex-direction: column; background: rgba(20,24,32,.94); }
.pdf-bar { display: flex; gap: 8px; align-items: center; padding: 8px 12px; background: var(--panel); border-bottom: 1px solid var(--line); }
.pdf-bar strong { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; }
.pdf-bar button { min-height: 36px; font-size: 13.5px; padding: 0 12px; }
.pdf-pages { flex: 1 1 auto; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.pdf-pages img { width: min(100%, 900px); height: auto; background: #fff; border-radius: 4px; box-shadow: 0 4px 18px rgba(0,0,0,.4); }
.pdf-status { color: #e5e7eb; margin: 40px 0; text-align: center; }
