/* The office's money detail screens: the screens' own layout. Rows,
   badges, buttons, facts and form panels are the library's (blocks.css).
   claim-  a payment notice (B-Pedido boards)
   rec-    the bank reconciliation (B-Conciliacao boards)
   The paper copies (B-Documento) carry their own styles in their page. */

/* Payment notice: the notice and its charges on the left, the answer on
   the right; on a phone one column, and while the office decides, its two
   buttons in a bar above the tab bar. */
.claim-page { max-width: 1080px; }
.claim-page .page-head h1 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.claim-page .page-head h1 .badge { font-size: var(--text-small); letter-spacing: 0; }
.claim-page .page-head > :first-child > p { margin-top: 6px; font-size: var(--text-label); }
.claim-status { color: var(--muted); font-size: var(--text-small); font-weight: 600; letter-spacing: 0; }
.claim-page .claim-short { display: none; }

.claim-split { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.claim-main { display: grid; gap: 24px; min-width: 0; }
.claim-notice, .claim-decision { padding: 20px; border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow); overflow-wrap: anywhere; }
.claim-notice { padding-bottom: 8px; }
.claim-says { margin: 0; color: var(--muted); font-size: var(--text-small); }
.claim-amount { margin: 2px 0 0; font-family: var(--display); font-size: 2.75rem; font-style: italic; font-weight: 400; line-height: 1.1; font-variant-numeric: tabular-nums; }
.claim-facts { grid-template-columns: 140px minmax(0, 1fr); margin-top: 14px; }
.claim-facts > :nth-child(-n+2) { border-top: 1px solid var(--line-soft); }
.claim-facts :is(dt, dd) { padding: 12px 0; border-color: var(--line-soft); }
.claim-facts dd { font-weight: 400; }

.claim-heading { margin: 0 4px 10px; color: var(--muted); font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.claim-charges .row-item { padding-inline: 20px; }
.claim-charges .row-title { font-weight: 700; }
.claim-charges .row-aside { font-size: var(--text-body); }
.claim-charges .row-item { flex-wrap: nowrap; }
.claim-charges .row-main { flex: 1 1 0; }
.claim-charges .row-aside { order: 0; flex-basis: auto; }
.claim-sum { background: var(--surface-2); }
.claim-charges .claim-sum .row-title { color: var(--muted); font-size: var(--text-label); font-weight: 400; }

.claim-decision h2 { margin: 0; font-size: 1.0625rem; }
.claim-help { margin: 8px 0 0; color: var(--muted); font-size: var(--text-label); line-height: 1.45; }
.claim-decision > .claim-help:first-child { margin-top: 0; }
.claim-actions { display: grid; gap: 8px; margin-top: 18px; }
.claim-actions .btn, .claim-confirm .btn { width: 100%; }
.claim-confirm { margin: 0; }
.claim-outcome { margin: 14px 0 0; padding: 12px 14px; border-radius: var(--radius); background: var(--surface-2); font-size: var(--text-label); }
.claim-outcome p { margin: 4px 0 0; }
.claim-links a { color: var(--blue); }
.claim-links { display: grid; gap: 8px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line-soft); font-size: var(--text-label); }
.claim-bar { display: none; }

@media (max-width: 1000px) {
  .claim-split { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 700px) {
  .claim-page .claim-long { display: none; }
  .claim-page .claim-short { display: inline; }
  .claim-page .page-head > :first-child > p .claim-short { display: inline-flex; align-items: center; gap: 8px; }
  .claim-page .page-head > :first-child > p .badge { font-size: var(--text-small); }
  .claim-split, .claim-main { gap: 24px; }
  .claim-notice { padding: 18px 16px 6px; }
  .claim-amount { font-size: 2.5rem; }
  .claim-facts { grid-template-columns: 110px minmax(0, 1fr); margin-top: 12px; }
  .claim-facts :is(dt, dd) { padding: 11px 0; }
  .claim-charges .row-item { padding-inline: 16px; }
  .claim-charges .row-title { font-size: .9375rem; }

  /* The answer for the office: only its links, under the charges; the two
     buttons go to the bar. */
  .is-deciding .claim-decision { padding: 0; background: none; box-shadow: none; }
  .is-deciding .claim-decision :is(h2, .claim-help, .claim-actions) { display: none; }
  .is-deciding .claim-links { display: flex; gap: 16px; margin: -10px 8px 0; padding: 0; border: 0; font-weight: 600; }
  .claim-bar { position: sticky; bottom: var(--tabbar-h, 0); z-index: 5; display: flex; gap: 8px; margin: 24px -16px 0; padding: 12px; border-top: 1px solid var(--line); background: var(--surface); }
  .claim-bar > .btn { flex: 1; height: 48px; color: var(--ink); font-size: .9375rem; }
  .claim-bar .claim-confirm { flex: 2; }
  .claim-bar .claim-confirm .btn { height: 52px; font-size: .9375rem; }
}

/* Bank reconciliation: the statement's movements on the left, the open
   one on the right; on a phone the list (.rec-at-list) and the movement
   (.rec-at-detail) are each their own page under the same head and tabs. */
.rec-page { position: relative; max-width: 1120px; overflow-wrap: anywhere; }
@media (min-width: 701px) { .rec-page .page-head { align-items: flex-end; } }
.rec-page .page-head > :first-child > p { margin-top: 6px; font-size: var(--text-label); }
.rec-page .page-head > :first-child > p a { color: var(--blue); }
.rec-page .rec-short, .rec-menu-phone { display: none; }
.rec-page > .card-alert { margin-top: var(--space-4); }
.rec-tabs { margin-bottom: 22px; }

.rec-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 24px; align-items: start; }
.rec-side { display: grid; gap: 16px; min-width: 0; }

/* The list: the open movement on pale blue, with a blue edge. */
.rec-page .row-item { flex-wrap: nowrap; }
.rec-page .row-main { flex: 1 1 0; }
.rec-page .row-aside { order: 0; flex-basis: auto; font-size: var(--text-body); }
.rec-list .row-item { padding: 13px 16px; }
.rec-list .row-item > svg { display: none; }
.rec-list .row-title { font-size: .9375rem; font-weight: 700; }
.rec-list .row-item.is-selected { background: var(--blue-soft); box-shadow: inset 3px 0 0 var(--blue); }
.rec-list .show-more { margin-top: var(--space-3); }

/* Folded parts: the duplicate rows, the history. */
.rec-fold { border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow); }
.rec-fold > summary { display: flex; align-items: center; gap: 8px; padding: 14px 16px; color: var(--blue); font-size: var(--text-label); font-weight: 600; cursor: pointer; }
.rec-fold > summary:hover { color: var(--blue-deep); }
.rec-fold > :not(summary) { margin: 0 16px 14px; }
.rec-fold > .row-list { margin: 0; border-top: 1px solid var(--line-soft); border-radius: 0 0 var(--radius-lg) var(--radius-lg); box-shadow: none; }
.rec-history { margin-top: 22px; background: var(--surface-2); box-shadow: none; }
.rec-history .facts { margin-bottom: 10px; }
.rec-log { padding: 0; list-style: none; color: var(--muted); font-size: var(--text-small); }
.rec-log li + li { margin-top: 4px; }

/* The open movement. */
.rec-detail { min-width: 0; padding: 22px; border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow); }
.rec-when, .rec-desc { margin: 0; color: var(--muted); font-size: var(--text-small); }
.rec-desc { margin-top: 4px; font-size: var(--text-label); }
.rec-amount { margin: 2px 0 0; font-family: var(--display); font-size: 2.5rem; font-style: italic; font-weight: 400; line-height: 1.1; font-variant-numeric: tabular-nums; }
.rec-part { margin-top: 22px; }
.rec-heading { margin: 0; color: var(--muted); font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.rec-help { margin: 6px 0 0; color: var(--muted); font-size: var(--text-small); line-height: 1.45; }
.rec-suggestion { display: flex; align-items: center; gap: 14px; margin-top: 10px; padding: 14px 16px; border-radius: var(--radius); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--blue-line); }
.rec-suggestion p { flex: 1; min-width: 0; margin: 0; }
.rec-who { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: .9375rem; }
.rec-suggestion small { display: block; margin-top: 2px; color: var(--muted); font-size: var(--text-small); }
.rec-existing { margin: 18px 0 0; }
.rec-existing .text-btn { margin-top: 2px; }
.rec-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.rec-more { margin: 10px 0 0; font-size: var(--text-small); }
.rec-foot { margin: 16px 0 0; color: var(--faint); font-size: var(--text-small); }
.rec-state { margin: 22px 0 0; color: var(--muted); font-size: var(--text-label); font-weight: 600; }
.rec-reason { margin: 10px 0 0; padding: 12px 14px; border-radius: var(--radius); background: var(--surface-2); font-size: var(--text-label); }
.rec-matched { margin-top: 10px; overflow: hidden; border-radius: var(--radius); box-shadow: inset 0 0 0 1px var(--line); }
.rec-payment { margin: 0; padding: 12px 16px; border-bottom: 1px solid var(--line-soft); font-size: var(--text-label); }
.rec-matched .row-list { border-radius: 0; box-shadow: none; }
.rec-matched .card-alert { margin: 0; }

/* The split and the search, in the open movement. */
.rec-form { display: grid; gap: 12px; margin-top: 12px; }
.rec-split-line { display: grid; grid-template-columns: minmax(0, 1fr) 8rem; align-items: center; gap: 12px; font-size: var(--text-label); }
.rec-split-line small { display: block; color: var(--muted); font-size: var(--text-small); }
.rec-total { margin: 0; font-size: var(--text-label); font-weight: 600; }
.rec-claims { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0; font-size: var(--text-small); }
.rec-search { display: flex; gap: 8px; margin: 12px 0; }
.rec-search input { flex: 1; min-width: 0; }
.rec-part > .row-list { border-radius: var(--radius); box-shadow: inset 0 0 0 1px var(--line); }

@media (max-width: 1000px) {
  .rec-split { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 700px) {
  .rec-page .rec-long, .rec-menu { display: none; }
  .rec-page .rec-short { display: inline; }
  .rec-page .more-menu-panel .rec-short { display: block; }
  .rec-menu-phone { display: block; position: absolute; top: 0; right: 0; }
  .rec-menu-phone .icon-btn { width: 44px; height: 44px; border-radius: 10px; background: var(--surface-3); color: var(--ink); }
  .rec-page .page-head { margin-bottom: 0; }
  .rec-page .page-head h1 { padding-right: 52px; }
  .rec-tabs { margin: 12px -16px 18px; padding: 0 16px; }
  .rec-at-list .rec-detail { display: none; }
  .rec-at-detail .rec-side { display: none; }
  .rec-at-list .rec-list .row-item.is-selected { background: none; box-shadow: none; }
  .rec-detail { margin: 0 -4px; padding: 18px 16px; }
  .rec-amount { font-size: 2.375rem; }
  .rec-desc { margin-top: 2px; }
  .rec-part { margin-top: 16px; }
  .rec-suggestion { display: block; margin-top: 8px; padding: 12px 14px; }
  .rec-suggestion .btn { width: 100%; height: 52px; margin-top: 12px; font-size: .9375rem; }
  .rec-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
  .rec-actions .btn { width: 100%; }
  .rec-actions .btn:only-child { grid-column: 1 / -1; }
  .rec-foot { display: none; }
  .rec-split-line { grid-template-columns: minmax(0, 1fr) 6.5rem; }
}
