/* Today module. Task rows reuse css/tasks.css (.task-card, .task-tick,
   .task-title, .task-meta, .task-pri, .task-due) and section headings reuse
   .task-group / .task-group-label from the same file, so both task and event
   sections share the app's existing rhythm without duplicating it here.
   Only the event row is new — nothing in tasks.css fits a compact,
   single-line, clickable event summary. */

.today-quiet {
  padding: 0 1.5rem 1rem;
  font-size: .85rem;
  font-style: italic;
  color: var(--muted);
}

/* The greeting/date line used to live in .module-subtitle, but css/shell.css
   now hides .module-label/.module-subtitle unconditionally, so it moved here
   as the first line of the content area. Deliberately not .today-quiet's
   italic — that class also means "nothing to show yet", and the date line
   is neither empty nor an error state. */
.today-date-line {
  padding: 0 1.5rem 1rem;
  font-size: .8rem;
  color: var(--muted);
}

.today-event-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: .75rem 1rem;
  margin-bottom: .55rem;
  cursor: pointer;
  transition: border-color .2s;
}
.today-event-row:hover { border-color: rgba(232,162,61,0.35); }

.today-event-name {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: .95rem;
  color: var(--bone);
}

.today-event-meta {
  display: flex;
  align-items: center;
  gap: .6rem;
  flex: 0 0 auto;
}

.today-event-date {
  font-size: .72rem;
  color: var(--muted);
  white-space: nowrap;
}

/* Deposits-owed row (window.todayDepositSection) reuses .today-event-row/
   .today-event-name/.today-event-date wholesale and adds only these two —
   an amount and a button to clear it — rather than a second row style. */
.today-deposit-amt {
  font-size: .78rem;
  font-weight: 600;
  color: var(--amber);
  white-space: nowrap;
}
/* Same fix as css/event-card.css's .evc-unpaid/.ast-cost: --amber doesn't
   clear contrast as text on the white light-theme card. */
body.light-theme .today-deposit-amt { color: #9C5C08; }

.today-deposit-pay {
  background: transparent;
  border: 1px solid var(--glass-border);
  color: var(--teal-bright);
  border-radius: 999px;
  font-family: 'Archivo', sans-serif;
  font-weight: 700;
  font-size: .64rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: .3rem .65rem;
  cursor: pointer;
  transition: border-color .2s;
}
.today-deposit-pay:hover { border-color: var(--teal-bright); }
.today-deposit-pay:disabled { opacity: .5; cursor: default; }
/* Mirrors .evc-paid in css/event-card.css, same colour pair for the same reason. */
body.light-theme .today-deposit-pay { color: var(--teal); }

/* ==========================================================================
   Unconfirmed dates.

   The one block on this screen that is a warning rather than a list, so it is
   the one block that carries a border and a tint. Red, not amber: amber on this
   screen already means "money you are owed" (.today-deposit-amt), and this is
   money that will vanish rather than money that is late.

   #E05A4A is a flat accent — fine as a border and as a fill at 7%, and NOT fine
   as text on the white light theme, where it reads about 3.2:1. Every use of it
   as text below carries the #B03A2E counterpart this codebase settled on.
   ========================================================================== */

.today-unconfirmed {
  margin: 0 1.5rem 1.4rem;
  padding: .95rem 1.1rem 1rem;
  background: rgba(224,90,74,0.07);
  border: 1px solid rgba(224,90,74,0.35);
  border-radius: 14px;
}

.today-unconfirmed-title {
  font-family: 'Archivo', sans-serif;
  font-size: .64rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 700;
  color: #E05A4A;
  margin-bottom: .5rem;
}
body.light-theme .today-unconfirmed-title { color: #B03A2E; }

.today-unconfirmed-lead {
  font-size: .8rem;
  line-height: 1.55;
  color: var(--sand);
  margin-bottom: .9rem;
}

.today-unconfirmed-row {
  background: var(--charcoal-soft);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  padding: .75rem .9rem;
  cursor: pointer;
  transition: border-color .2s;
}
.today-unconfirmed-row + .today-unconfirmed-row { margin-top: .55rem; }
.today-unconfirmed-row:hover { border-color: rgba(224,90,74,0.5); }

/* Not .today-event-meta: that one is flex:0 0 auto and sits on the right of a
   single-line row. This row stacks — name, when, why, what to do — because the
   reason is the part that makes the warning actionable and it does not fit on a
   phone beside a name. */
.today-unconfirmed-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: .35rem;
}

.today-unconfirmed-when {
  font-size: .74rem;
  font-weight: 600;
  color: #E05A4A;
  white-space: nowrap;
}
body.light-theme .today-unconfirmed-when { color: #B03A2E; }

.today-unconfirmed-reason {
  font-size: .74rem;
  line-height: 1.5;
  color: var(--sand);
  margin-top: .45rem;
}

.today-unconfirmed-fix {
  font-size: .72rem;
  line-height: 1.5;
  color: var(--muted);
  margin-top: .5rem;
}

/* ==========================================================================
   Receipt capture — the block at the top of Today, and the confirm sheet.

   The sheet itself is deliberately styled by index.html's existing form
   furniture (.ev-form-backdrop / .ev-form-card / .form-input / .form-select /
   .btn), so only the parts that have no equivalent there are below. Everything
   here is prefixed .today-receipt- or .trc-; nothing reuses an app-wide name.
   ========================================================================== */

.today-receipt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .9rem;
  margin: 0 1.5rem 1.4rem;
  padding: 1rem 1.1rem;
  background: var(--charcoal-soft);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
}

.today-receipt-title {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 1rem;
  color: var(--bone);
}

.today-receipt-sub {
  font-size: .74rem;
  color: var(--muted);
  margin-top: .15rem;
}

.today-receipt-actions {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex: 0 0 auto;
}

/* The label is the button. The file input inside it is the real control and is
   kept in the document rather than display:none'd — a display:none input cannot
   be reached by keyboard, and hiding it that way would leave this feature
   mouse-and-touch only. Sized to zero and positioned instead, with the focus
   ring drawn on the label via :focus-within. */
.today-receipt-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  background: transparent;
  border: 1px solid var(--glass-border);
  color: var(--bone);
  border-radius: 999px;
  font-family: 'Archivo', sans-serif;
  font-weight: 700;
  font-size: .68rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: .55rem .95rem;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color .2s, background .2s;
}
.today-receipt-btn:hover { border-color: var(--amber); }
.today-receipt-btn:focus-within { outline: 2px solid var(--amber); outline-offset: 2px; }

/* Taking the photo is the primary action and is meant to look like it — this is
   the one thing on the screen he may be standing at a counter needing. */
.today-receipt-btn-primary {
  background: var(--amber);
  border-color: var(--amber);
  color: #1A1410;
}
.today-receipt-btn-primary:hover { background: var(--amber); border-color: var(--bone); }

.today-receipt-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

@media (max-width: 560px) {
  .today-receipt { flex-direction: column; align-items: stretch; }
  .today-receipt-actions { width: 100%; }
  .today-receipt-btn { flex: 1 1 0; justify-content: center; }
}

/* ---- the confirm sheet -------------------------------------------------- */

/* Reading, and the several ways it can fail. A failure always says so here —
   an empty card would read as a receipt that was successfully found to be
   blank, which is the one thing this must never look like. */
.trc-status {
  font-size: .88rem;
  line-height: 1.55;
  color: var(--bone);
  padding: .9rem 1rem;
  border-radius: 10px;
  border-left: 2px solid var(--glass-border);
  background: rgba(255,255,255,0.03);
}
.trc-status-working { border-left-color: var(--amber); color: var(--muted); }
.trc-status-error { border-left-color: #E05A4A; background: rgba(224,90,74,0.08); }

/* Same amber "worth a look" treatment js/invoices.js uses for the same job, so
   a hesitation on a receipt and a hesitation on an invoice read alike. */
.trc-warnings {
  border: 1px solid rgba(232,162,61,0.35);
  background: rgba(232,162,61,0.07);
  border-radius: 10px;
  padding: .8rem .95rem;
  margin-bottom: 1.2rem;
}
.trc-warnings-title {
  font-size: .64rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--amber);
  margin-bottom: .5rem;
}
.trc-warning {
  font-size: .82rem;
  line-height: 1.5;
  color: var(--bone);
}
.trc-warning + .trc-warning { margin-top: .45rem; }
/* Raw amber is around 2:1 on white — see css/event-card.css and .today-deposit-amt above. */
body.light-theme .trc-warnings-title { color: #9C5C08; }

.trc-amount-wrap { margin-bottom: 1.1rem; }

/* The figure that becomes money, given the size to match. */
.trc-amount {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 1.5rem;
  color: var(--amber);
}
body.light-theme .trc-amount { color: #9C5C08; }

.trc-provenance {
  margin-top: .4rem;
  font-size: .74rem;
  line-height: 1.45;
  color: var(--muted);
}
/* Not knowing where the amount came from is a caution, not a neutral fact. */
.trc-provenance-missing { color: #E05A4A; }
body.light-theme .trc-provenance-missing { color: #B03A2E; }

.trc-note {
  margin-top: 1rem;
  font-size: .72rem;
  font-style: italic;
  line-height: 1.5;
  color: var(--muted);
}

.trc-actions {
  display: flex;
  gap: .6rem;
  flex-wrap: wrap;
  margin-top: 1.1rem;
}
.trc-actions .btn { flex: 1 1 auto; }

/* A photo that was NOT kept is a caution, not a footnote — he can still keep the
   paper, but only while he is standing there holding it. Red as text, so
   #B03A2E on the white light theme where raw #E05A4A reads about 3.2:1. */
.trc-note-warn {
  font-style: normal;
  color: #E05A4A;
}
body.light-theme .trc-note-warn { color: #B03A2E; }

/* The marker on a row whose receipt photo was kept. Small and quiet: it is a
   fact about the row, not an action being pushed.

   Used by the expenses list here AND by the assets register in js/assets.js.
   Both open the same viewer (window.todayReceiptViewImage) for the same reason —
   the bucket is private, so seeing anything in it means one server-signed
   short-lived URL — so they share its look rather than defining it twice. */
.trc-receipt-pill {
  display: inline-block;
  margin-left: .45rem;
  padding: .1rem .4rem;
  border: 1px solid rgba(232,162,61,0.4);
  border-radius: 999px;
  background: rgba(232,162,61,0.1);
  color: var(--amber);
  font-family: inherit;
  font-size: .62rem;
  letter-spacing: .5px;
  text-transform: uppercase;
  font-weight: 700;
  cursor: pointer;
  vertical-align: middle;
}
.trc-receipt-pill:hover { background: rgba(232,162,61,0.2); }
body.light-theme .trc-receipt-pill { color: #9C5C08; }

/* The photo itself. Capped by viewport height so a portrait receipt on a phone
   is scrollable rather than pushing the "open in a new tab" link off-screen. */
.trc-image-wrap {
  margin-bottom: .9rem;
  border-radius: 10px;
  border: 1px solid var(--glass-border);
  background: rgba(0,0,0,0.25);
  overflow: auto;
  max-height: 60vh;
}
.trc-image {
  display: block;
  width: 100%;
  height: auto;
}
body.light-theme .trc-image-wrap { background: rgba(0,0,0,0.04); }

.trc-image-actions {
  display: flex;
  gap: .6rem;
  flex-wrap: wrap;
}
.trc-image-actions .btn { flex: 1 1 auto; text-align: center; text-decoration: none; }
