.fin-costs-page .fin-summaries { display: grid; grid-template-columns: minmax(0,1fr) minmax(220px,.29fr); gap: 14px; }
.cost-budget { grid-template-columns: minmax(0,1.15fr) minmax(0,1fr) minmax(0,1fr); align-items: center; gap: 10px 16px; }
.cost-budget::before { inset: 21% -8% -143% 38%; }
.cost-total { display: grid; gap: 6px; }
.cost-budget-value { font-size: clamp(21px,2.25vw,32px); }
.cost-part { display: grid; align-content: center; justify-items: start; gap: 4px; padding-left: 15px; border-left: 1px solid #ffffff40; }
.cost-part-label { display: flex; align-items: center; gap: 6px; color: #f2efff; font-size: 13px; font-weight: 650; }
.cost-part-label .icon { width: 15px; height: 15px; }
.cost-part-amount { color: #fff; font-size: clamp(19px,2vw,25px); font-weight: 720; font-variant-numeric: tabular-nums; }
.cost-unpriced {
  display: grid; align-content: space-between; gap: 5px; border: 1px solid #eedbb9; border-radius: var(--crm-radius);
  padding: 11px 14px; background: linear-gradient(115deg,#fffefb,#fff3df); color: #754515; text-align: left;
  font: inherit; cursor: pointer; box-shadow: var(--crm-shadow);
}
.cost-unpriced:hover,.cost-unpriced[aria-pressed="true"] { border-color: #d6a862; background: #fff0d7; }
.cost-unpriced-label { display: flex; align-items: center; gap: 7px; font-weight: 700; }
.cost-unpriced .fin-tile { background: #fce8c8; color: #8a4f11; }
.cost-unpriced-value { font-size: 28px; line-height: 1.1; }
.cost-unpriced-hint { display: flex; align-items: center; gap: 7px; color: #805327; font-size: 12px; }
.cost-unpriced-hint .icon { width: 14px; }
.cost-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 9px 12px; border-bottom: 1px solid #e1e6f3; }
.cost-tools .fin-search { flex-basis: 230px; max-width: 430px; }
.cost-scroll { max-height: min(615px,calc(100dvh - 300px)); overflow-y: auto; border-radius: 0 0 13px 13px; }
.cost-table { width: 100%; border-collapse: separate; border-spacing: 0; table-layout: fixed; }
.cost-table :is(th,td) { text-align: left; vertical-align: middle; border: 0; }
.cost-table th:first-child { width: 32%; }
.cost-table th:nth-child(2) { width: 26%; }
.cost-table th:nth-child(3) { width: 17%; }
.cost-table th:nth-child(5) { width: 36px; }
.cost-table thead th {
  position: sticky; top: 0; z-index: 2; padding: 7px 12px; background: #edf1fa; color: #465979; font-size: 12px; font-weight: 670;
}
.cost-table tbody td { padding: 6px 12px; height: 45px; border-bottom: 1px solid #e5eaf4; background: transparent; }
.cost-table tbody tr.cost-entry:hover { background: #f5f1ff; cursor: pointer; }
.cost-table tbody tr.cost-entry.is-selected { background: #f0eaff; }
.cost-table .cost-group th { padding: 6px 12px; border-bottom: 1px solid #e1e6f3; background: linear-gradient(105deg,#f2eeff,#eef8fb); }
.cost-group-content { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 4px 10px; }
.cost-order { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 4px 7px; color: #4e34ac; border: 0; background: transparent; padding: 0; font: inherit; font-weight: 710; text-align: left; cursor: pointer; }
.cost-order:hover { text-decoration: underline; }
.cost-group-total { display: flex; align-items: baseline; gap: 5px 8px; font-size: 13px; }
.cost-group-total > span { font-size: 12px; color: #445676; font-weight: 600; }
.cost-group-total .cost-money { margin-right: 24px; }
.cost-line-name { display: block; color: var(--crm-ink); font-weight: 700; overflow-wrap: anywhere; }
.cost-labels { display: flex; flex-wrap: wrap; align-items: center; gap: 3px 7px; }
.cost-timing,.cost-sub { display: block; color: var(--crm-muted); font-size: 12px; }
.cost-money { white-space: nowrap; font-weight: 720; font-variant-numeric: tabular-nums; }
.cost-value { display: grid; justify-items: end; gap: 3px; }
.cost-table th.cost-money,.cost-table td:nth-child(4) { text-align: right; }
.cost-partner { background: #e6f5f0; color: #25624f; border-color: #cfe9e1; }
.cost-needs-price { background: #fff3de; color: #824d1a; border-color: #efdcb7; }
.cost-detail {
  display: grid; place-items: center; min-width: 25px; min-height: 29px; margin-left: -7px; padding: 0;
  border: 0; border-radius: 6px; background: transparent; color: #644fc0; cursor: pointer;
}
.cost-detail:hover { background: #ebe4ff; }
.cost-detail .icon { width: 13px; transform: rotate(-90deg); }
.cost-breakdown { padding: 11px 13px; }
.cost-breakdown h3 { margin-bottom: 5px; }
.cost-breakdown dl > div { display: grid; grid-template-columns: minmax(75px,.7fr) minmax(0,1.3fr); align-items: baseline; gap: 8px; padding: 7px 0; border-bottom: 1px solid #e4e9f3; }
.cost-breakdown dl > div:last-child { border-bottom: 0; }
.cost-breakdown dt { color: var(--crm-muted); font-size: 13px; }
.cost-breakdown dd { text-align: right; font-weight: 650; overflow-wrap: anywhere; }
.cost-breakdown dd .cost-order { text-align: right; justify-content: flex-end; }
.cost-breakdown p { color: #405271; }
.cost-drawer-links { display: flex; flex-wrap: wrap; gap: 8px; }
@media (max-width: 800px) {
  .fin-costs-page .fin-summaries { grid-template-columns: minmax(0,1fr); gap: 8px; }
  .cost-unpriced { grid-template-columns: minmax(0,1fr) auto; align-items: center; padding: 8px 10px; }
  .cost-unpriced-hint { grid-column: 1 / -1; margin-left: 35px; }
  .cost-scroll { max-height: none; overflow: visible; }
  .cost-table, .cost-table tbody { display: block; }
  .cost-table thead { display: none; }
  .cost-table tbody tr { display: grid; grid-template-columns: minmax(0,1fr) auto 25px; grid-template-areas: "label amount more" "person when when"; align-items: center; gap: 4px 6px; padding: 7px 8px; border-bottom: 1px solid #e5eaf4; }
  .cost-table tbody td { display: block; padding: 0; height: auto; border: 0; }
  .cost-table .cost-group { display: block; padding: 0; }
  .cost-table .cost-group th { display: block; width: 100%; border-bottom: 0; padding-inline: 8px; }
  .cost-group-total .cost-money { margin-right: 0; }
  .cost-entry td:nth-child(1) { grid-area: label; }
  .cost-entry td:nth-child(2) { grid-area: person; font-size: 12px; }
  .cost-entry td:nth-child(3) { grid-area: when; text-align: right; }
  .cost-entry td:nth-child(4) { grid-area: amount; }
  .cost-entry td:nth-child(5) { grid-area: more; }
  .cost-detail { margin-left: 0; }
}
@media (max-width: 480px) {
  .cost-budget { grid-template-columns: repeat(2,minmax(0,1fr)); padding: 10px; gap: 8px; }
  .cost-total { grid-column: 1 / -1; border-bottom: 1px solid #ffffff40; padding-bottom: 7px; }
  .cost-part { border-left: 0; padding-left: 0; }
  .cost-part + .cost-part { padding-left: 10px; border-left: 1px solid #ffffff40; }
  .cost-part-label { font-size: 12px; }
  .cost-part-amount { font-size: 18px; }
  .cost-table .cost-line-name,.cost-table .cost-money { font-size: 13px; }
  .cost-tools .fin-search { flex-basis: 100%; }
}

