/* Expenses (FEATURES 12): expense rows, the add sheet, report cards, Expense reports and Receipts laid out for a
   laptop, the workspace Home's Budget card and a request's costs. Colors and fonts come from brand.css. */

/* One expense: where, what and its marks on the left, the amount on the right. */
.xrs { list-style: none; padding: 0; display: grid; }
.xrs li + li { border-top: 1px solid var(--hair); }
.xr {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 6px 16px; width: 100%;
  padding: 14px 12px; border: 0; border-radius: 12px; background: none; color: var(--navy); text-align: left;
}
button.xr { cursor: pointer; }
button.xr:hover { background: var(--off); }
.xr-main { display: grid; gap: 2px; min-width: 0; }
.xr-main b { font-weight: 800; overflow-wrap: anywhere; }
.xr-main span { overflow-wrap: anywhere; }
.xr-main small { color: var(--slate); font-size: 17px; font-weight: 600; overflow-wrap: anywhere; }
.xr-main .xr-date { font-size: 13px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
.xr-main .tags { margin-top: 6px; }
.xr-amt { font-size: 19px; font-weight: 900; font-variant-numeric: tabular-nums; white-space: nowrap; }
.xr-none { padding: 12px; }
.tag.own { background: var(--white); box-shadow: inset 0 0 0 1.5px var(--navy); }
.tag.ok { background: var(--ok-bg); color: var(--ok); }

/* Adding or changing one, in a sheet. */
.xf { display: grid; gap: 18px; }
.xf-pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 18px; }
.xf-money { position: relative; display: block; }
.xf-money > span { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--slate); font-weight: 800; }
.xf-money .input { padding-left: 30px; font-variant-numeric: tabular-nums; }
.xf-receipt { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 14px; }
.xf-file { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 800; color: var(--ok); overflow-wrap: anywhere; }
a.xf-file { color: var(--navy); }
.xf-file .ic { color: var(--blue); }
.xf-file.none { color: var(--late); }
.xf-file.none .ic { color: var(--late); }
.xf-pick { position: relative; overflow: hidden; cursor: pointer; }
.xf-pick:focus-within { outline: 3px solid var(--blue); outline-offset: 2px; }
.xf-input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.xf-card { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; }
.xf-card .field { flex: 1 1 160px; }
.xd { display: grid; }
.xd .row-icon { color: var(--blue); }

/* A report as a card. */
.xc { display: grid; gap: 14px; padding: 20px 16px; }
.xc-head {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 0 4px;
  border: 0; background: none; color: var(--navy); text-align: left;
}
button.xc-head { cursor: pointer; min-height: 44px; }
.xc-head-in { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 8px 16px; }
.xc-head-main { flex: 1 1 220px; display: grid; gap: 4px; min-width: 0; }
.xc-head-main .eyebrow { margin: 0; }
.xc-title { font-size: 22px; font-weight: 900; line-height: 1.2; overflow-wrap: anywhere; }
.xc-head-end { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.xc-total { font-size: 22px; font-weight: 900; font-variant-numeric: tabular-nums; white-space: nowrap; }
.xc-chev { flex: none; align-self: center; color: var(--slate); transition: transform .2s var(--ease); }
.xc-head[aria-expanded="true"] .xc-chev { transform: rotate(180deg); }
.xc-body { display: grid; gap: 10px; }
.xc-body > p { padding: 0 4px; }
.xc-split { display: flex; flex-wrap: wrap; gap: 2px 16px; color: var(--slate); font-weight: 700; font-variant-numeric: tabular-nums; }
.xc-back { padding: 12px 14px !important; border-radius: 12px; background: var(--late-bg); overflow-wrap: anywhere; }
.xc-back b { color: var(--late); }
.xc-missing { display: flex; align-items: center; gap: 8px; color: var(--late); font-weight: 800; }
.xc-btns { display: flex; flex-wrap: wrap; gap: 10px; padding: 4px 4px 0; }
.xc-btns .btn .ic, .budget-btns .btn .ic { width: 20px; height: 20px; }
@media (max-width: 640px) { .xc-btns .btn, .budget-btns .btn { flex: 1 1 auto; } }

/* Expense reports and Receipts: one column on a phone, two on a laptop. */
.xp-grid { display: grid; gap: 16px; align-items: start; }
.xp-earlier > .eyebrow, .xp-grid > .stack > .stack > .eyebrow, .xp-yours { padding: 6px 4px 0; margin: 0; }
.xo-list { list-style: none; padding: 0; display: grid; }
.xo-list > li + li { border-top: 1px solid var(--hair); }
.xo-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 12px; }
.xo-who { flex: 1 1 180px; display: grid; gap: 2px; min-width: 0; min-height: 44px; padding: 0; border: 0; background: none; color: var(--navy); text-align: left; cursor: pointer; }
.xo-who b { font-weight: 800; overflow-wrap: anywhere; }
.xo-who small { color: var(--slate); font-size: 17px; font-weight: 600; }
.note.pad { padding: 4px 12px 12px; }
.xs-bar { display: grid; gap: 16px; padding: 16px; }
.xs-month { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.xs-month h2 { font-size: 24px; font-weight: 900; text-align: center; }
.xs-month .icon-btn:disabled { opacity: .4; cursor: default; }
.xs-total { display: grid; gap: 10px; }
.xs-total .eyebrow { margin: 0; }
.xs-big { font-size: 34px; font-weight: 900; font-variant-numeric: tabular-nums; line-height: 1.1; }
.xs-sums { display: grid; gap: 4px; padding-top: 8px; border-top: 1px solid var(--hair); }
.xs-rows { list-style: none; padding: 0; display: grid; }
.xs-rows li { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 8px 0; }
.xs-rows li + li { border-top: 1px solid var(--hair); }
.xs-rows span { min-width: 0; overflow-wrap: anywhere; }
.xs-rows b { font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.xs-down { justify-self: start; text-decoration: none; }
@media (min-width: 900px) {
  .xp-grid { grid-template-columns: minmax(0, 1.35fr) minmax(320px, 1fr); gap: 20px; }
  .xs-bar { padding: 18px 20px; }
  .xc { padding: 24px 20px; }
}

/* The workspace Home's Budget card. */
.budget { display: grid; gap: 8px; }
.budget .eyebrow { margin: 0; }
.budget-big { font-size: 34px; font-weight: 900; line-height: 1.1; font-variant-numeric: tabular-nums; }
.budget-big.over { color: var(--late); }
.budget-rows { display: grid; }
.budget-rows .row:first-child { margin-top: 6px; border-top: 1px solid var(--hair); }
.link-row.warn .row-icon { color: var(--late); }
.budget-btns { display: flex; flex-wrap: wrap; gap: 10px; padding-top: 8px; }
.budget-btns .btn { text-decoration: none; }

/* A request's costs. */
.costs { display: grid; gap: 10px; }
.costs .eyebrow { margin: 0; }
.costs-total { font-size: 22px; font-weight: 900; font-variant-numeric: tabular-nums; }
.costs > .btn { justify-self: start; }
