/* Assets: what the business owns, and what it cost.

   Most colours here are existing theme-aware custom properties
   (--charcoal-soft, --glass-border, --bone, --muted redefine themselves under
   body.light-theme already in index.html's inline stylesheet) or flat accents
   (--amber and its tints, #E05A4A and its tints) that are the same in both
   themes by this project's convention — see css/invoices.css's header comment.
   The status chip follows .task-pri's hardcoded-hex + explicit light-theme
   override pattern (css/tasks.css) because its default colour is a warm
   off-white that reads wrong on a light background. */

.assets-wrap { padding: 0 1.5rem 2rem; }

.ast-toolbar {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 8px; margin-bottom: 1.2rem;
}
.ast-filters { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Totals ---------- */
/* .exp-summary / .exp-summary-card (index.html's inline stylesheet) are reused
   here so this totals row and the expenses one look like one system. Flat
   accent, no light-theme override needed. */
.ast-summary-warn .exp-summary-val { color: #E05A4A; }

/* ---------- The list ---------- */
.ast-row {
  display: flex; align-items: center; justify-content: space-between; gap: .8rem;
  background: var(--charcoal-soft); border: 1px solid var(--glass-border);
  border-radius: 10px; padding: .8rem 1rem; margin-bottom: .55rem; cursor: pointer;
}
.ast-row:hover { border-color: var(--amber); }

/* Disposed items are dimmed, not hidden — what was spent stays part of the
   record. Opacity dims foreground and border together without introducing a
   hardcoded colour, so it needs no separate light-theme rule. */
.ast-row-disposed { opacity: .5; }

/* Same flat rgba border .task-card.overdue uses (css/tasks.css) — a warning
   that reads the same in both themes. */
.ast-row-warn { border-color: rgba(224,90,74,0.55); }

.ast-row-main { min-width: 0; }
.ast-name {
  font-family: 'Fraunces', serif; font-weight: 600; font-size: .95rem;
  color: var(--bone); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ast-qty { color: var(--muted); font-size: .75rem; font-weight: 400; font-family: 'Archivo', sans-serif; }
.ast-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-top: .3rem;
  font-size: .72rem; color: var(--muted);
}
.ast-cost {
  font-family: 'Archivo', sans-serif; font-weight: 600; font-size: .95rem;
  color: var(--amber); white-space: nowrap; flex: 0 0 auto; text-align: right;
}
.ast-row-disposed .ast-cost { color: var(--muted); }
/* The per-row dollar figure is the most-read text on this screen. */
body.light-theme .ast-cost { color: #9C5C08; }

.ast-status {
  font-size: .6rem; letter-spacing: 1px; text-transform: uppercase;
  border-radius: 999px; padding: .08rem .5rem; border: 1px solid var(--glass-border);
  color: #C4A882;
}
body.light-theme .ast-status { color: #6B5B47; }

/* Test-and-tag warning badge. The "flat accents need no override" convention
   holds for fills and borders, NOT for text: raw --amber reads about 2:1 on a
   light card and #E05A4A about 3.2:1, both under AA. The profit figures hit
   exactly this and were given #9C5C08 / #B03A2E; reuse those rather than
   rediscover it. */
.ast-tag-warn {
  font-size: .6rem; letter-spacing: 1px; text-transform: uppercase; font-weight: 700;
  padding: .08rem .5rem; border-radius: 999px;
}
.ast-tag-overdue { color: #E05A4A; border: 1px solid rgba(224,90,74,0.5); background: rgba(224,90,74,0.1); }
.ast-tag-soon { color: var(--amber); border: 1px solid rgba(232,162,61,0.5); background: rgba(232,162,61,0.1); }
body.light-theme .ast-tag-overdue { color: #B03A2E; }
body.light-theme .ast-tag-soon { color: #9C5C08; }

/* ---------- The form ---------- */
.ast-section-title {
  font-family: 'Archivo', sans-serif; font-size: .68rem; letter-spacing: 2.5px;
  text-transform: uppercase; color: var(--amber); font-weight: 700;
  margin: 1.4rem 0 .6rem; padding-top: .9rem; border-top: 1px solid var(--glass-border);
}
body.light-theme .ast-section-title { color: #9C5C08; }
.ast-section-title:first-child { margin-top: 0; padding-top: 0; border-top: none; }

/* ---------- Reading a receipt ---------- */
/* The sheet, the candidate list, and the provenance marks.

   Same colour discipline as the rest of this file: theme-aware custom
   properties where they exist, flat accents for fills and borders, and the
   explicit light-theme text overrides (#9C5C08 amber, #B03A2E red) wherever an
   accent is used as TEXT — raw --amber reads about 2:1 on white. */

.ast-rcpt-btn { margin-left: auto; }

/* Below .ev-form-backdrop's z-index of 600, so when a candidate opens the asset
   form that form sits ON TOP of this sheet rather than under it. Both carry the
   .ev-form-backdrop class and this node is appended to the body last, so DOM
   order would otherwise put the wrong one in front. Equal specificity, later
   file wins — this stylesheet loads after index.html's inline <style>. */
.ast-rcpt-backdrop { z-index: 595; }
.ast-rcpt-card { max-width: 640px; }

.ast-rcpt-pick { margin-bottom: 1rem; }
.ast-rcpt-label {
  display: block; font-family: 'Archivo', sans-serif; font-size: .68rem;
  letter-spacing: 2px; text-transform: uppercase; color: var(--muted); margin-bottom: .5rem;
}
.ast-rcpt-file { width: 100%; color: var(--bone); font-size: .8rem; }
.ast-rcpt-hint { font-size: .72rem; color: var(--muted); margin-top: .5rem; line-height: 1.5; }

/* Status line. Working / done / error, and the error one has to be legible on
   both themes because it is where the server's own words land. */
.ast-rcpt-status:empty { display: none; }
.ast-rcpt-status {
  font-size: .78rem; line-height: 1.5; margin: .6rem 0 1rem;
  padding: .6rem .8rem; border-radius: 8px; border: 1px solid var(--glass-border);
  color: var(--muted);
}
.ast-rcpt-status-working { border-color: rgba(232,162,61,0.4); color: var(--amber); }
.ast-rcpt-status-done { border-color: rgba(31,163,158,0.45); color: #1FA39E; }
.ast-rcpt-status-error { border-color: rgba(224,90,74,0.5); color: #E05A4A; background: rgba(224,90,74,0.08); }
body.light-theme .ast-rcpt-status-working { color: #9C5C08; }
body.light-theme .ast-rcpt-status-error { color: #B03A2E; }

.ast-rcpt-warnings {
  border: 1px solid rgba(232,162,61,0.45); background: rgba(232,162,61,0.08);
  border-radius: 10px; padding: .8rem 1rem; margin-bottom: 1rem;
}
.ast-rcpt-warnings-title {
  font-family: 'Archivo', sans-serif; font-size: .64rem; letter-spacing: 2px;
  text-transform: uppercase; font-weight: 700; color: var(--amber); margin-bottom: .4rem;
}
body.light-theme .ast-rcpt-warnings-title { color: #9C5C08; }
.ast-rcpt-warning { font-size: .76rem; line-height: 1.55; color: var(--bone); margin-bottom: .35rem; }
.ast-rcpt-warning:last-child { margin-bottom: 0; }

.ast-rcpt-lead, .ast-rcpt-research-summary {
  font-size: .74rem; line-height: 1.55; color: var(--muted); margin-bottom: 1rem;
}

/* ---------- One candidate ---------- */
.ast-rcpt-cand {
  background: var(--charcoal-soft); border: 1px solid var(--glass-border);
  border-radius: 10px; padding: .85rem 1rem; margin-bottom: .7rem;
}
.ast-rcpt-cand-on { border-color: rgba(232,162,61,0.5); }
.ast-rcpt-cand-added { opacity: .55; }

.ast-rcpt-cand-head { display: flex; align-items: center; gap: .6rem; cursor: pointer; }
.ast-rcpt-check { width: 17px; height: 17px; accent-color: #E8A23D; flex: 0 0 auto; }
.ast-rcpt-cand-name {
  font-family: 'Fraunces', serif; font-weight: 600; font-size: .95rem; color: var(--bone);
}
.ast-rcpt-added-pill {
  font-size: .58rem; letter-spacing: 1px; text-transform: uppercase; font-weight: 700;
  padding: .1rem .5rem; border-radius: 999px; flex: 0 0 auto;
  color: #1FA39E; border: 1px solid rgba(31,163,158,0.5); background: rgba(31,163,158,0.1);
}

/* Why the model called this an asset. He reads this to catch a wrong call, so
   it sits directly under the name rather than at the bottom of the card. */
.ast-rcpt-reason { font-size: .74rem; line-height: 1.5; color: var(--muted); margin: .45rem 0 .6rem; }
.ast-rcpt-reason-missing { color: #E05A4A; }
body.light-theme .ast-rcpt-reason-missing { color: #B03A2E; }

.ast-rcpt-fields { display: flex; flex-direction: column; gap: .3rem; }
.ast-rcpt-field { display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem; font-size: .76rem; }
.ast-rcpt-field-label {
  color: var(--muted); font-size: .62rem; letter-spacing: 1.5px; text-transform: uppercase;
  min-width: 92px; flex: 0 0 auto;
}
.ast-rcpt-field-value { color: var(--bone); font-weight: 600; }

/* THE MARK. A value carrying this pill was not printed on the receipt — it was
   looked up for a product matched by name, which is an inference about
   something that might not be the item in the box. Amber rather than teal on
   purpose: this is a "check me", not a "verified". */
.ast-rcpt-web-pill {
  font-size: .55rem; letter-spacing: 1px; text-transform: uppercase; font-weight: 700;
  padding: .08rem .45rem; border-radius: 999px; white-space: nowrap;
  color: var(--amber); border: 1px solid rgba(232,162,61,0.55); background: rgba(232,162,61,0.12);
}
body.light-theme .ast-rcpt-web-pill { color: #9C5C08; }

.ast-rcpt-web-src { font-size: .68rem; color: var(--muted); flex-basis: 100%; padding-left: 92px; }
.ast-rcpt-web-src a { color: var(--amber); text-decoration: underline; }
body.light-theme .ast-rcpt-web-src a { color: #9C5C08; }
.ast-rcpt-field-web .ast-rcpt-field-value { border-bottom: 1px dashed rgba(232,162,61,0.6); }

.ast-rcpt-research {
  font-size: .7rem; line-height: 1.5; color: var(--muted);
  margin-top: .6rem; padding-top: .5rem; border-top: 1px solid var(--glass-border);
}

.ast-rcpt-skipped { font-size: .72rem; line-height: 1.5; color: var(--muted); margin: .8rem 0; }
.ast-rcpt-progress { font-size: .74rem; color: var(--bone); margin: .8rem 0; }

.ast-rcpt-err:empty { display: none; }
.ast-rcpt-err { font-size: .76rem; color: #E05A4A; margin: .6rem 0; }
body.light-theme .ast-rcpt-err { color: #B03A2E; }

.ast-rcpt-go { width: 100%; margin-top: .6rem; }
.ast-rcpt-foot { font-size: .7rem; color: var(--muted); margin-top: .6rem; line-height: 1.5; }

/* "Nothing durable on this receipt" is a finding, not an empty panel. */
.ast-rcpt-none {
  border: 1px solid var(--glass-border); border-radius: 10px; padding: 1rem;
  background: var(--charcoal-soft);
}
.ast-rcpt-none-title {
  font-family: 'Fraunces', serif; font-weight: 600; font-size: .95rem;
  color: var(--bone); margin-bottom: .4rem;
}
.ast-rcpt-none-body { font-size: .76rem; line-height: 1.6; color: var(--muted); }

/* ---------- Provenance, carried onto the asset form itself ---------- */
/* Injected into the top of the existing form body by js/assets.js. index.html
   is off-limits, and this is the only place the warning can sit where he is
   actually looking when he presses Save. */
.ast-rcpt-form-banner {
  border: 1px solid rgba(232,162,61,0.45); background: rgba(232,162,61,0.08);
  border-radius: 10px; padding: .8rem 1rem; margin-bottom: 1.2rem;
}
.ast-rcpt-form-title {
  font-family: 'Archivo', sans-serif; font-size: .64rem; letter-spacing: 2px;
  text-transform: uppercase; font-weight: 700; color: var(--amber); margin-bottom: .5rem;
}
body.light-theme .ast-rcpt-form-title { color: #9C5C08; }
.ast-rcpt-form-web-title {
  font-size: .68rem; letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--bone); font-weight: 700; margin-bottom: .4rem;
}
.ast-rcpt-form-web-row {
  display: flex; align-items: baseline; gap: .5rem; flex-wrap: wrap;
  font-size: .75rem; line-height: 1.5; color: var(--bone); margin-bottom: .35rem;
}
.ast-rcpt-form-web-row a { color: var(--amber); text-decoration: underline; }
body.light-theme .ast-rcpt-form-web-row a { color: #9C5C08; }
.ast-rcpt-form-web-foot, .ast-rcpt-form-allreceipt, .ast-rcpt-form-queue {
  font-size: .72rem; line-height: 1.55; color: var(--muted); margin-top: .4rem;
}

/* The same mark, on the input itself — the box he is looking at when he decides
   whether the number is right. Removed the moment he types in it, because from
   then on the value is his. */
.ast-field-web {
  border-color: rgba(232,162,61,0.75) !important;
  border-style: dashed !important;
  background-image: linear-gradient(rgba(232,162,61,0.07), rgba(232,162,61,0.07));
}
