#spendings-section{border:1px solid #dfe6f0;border-radius:12px;padding:0 12px;margin:12px 0;color:#17233b}
#spendings-section>summary{font-size:17px;font-weight:700;color:#102b7d}
.spendings-totals,.spendings-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;min-width:0}
.spendings-totals>div{padding:10px 6px;background:#f7f9ff;border:1px solid #dfe6f0;border-radius:10px;display:flex;flex-direction:column;justify-content:center;gap:6px;text-align:center;min-width:0}
.spendings-totals strong{font-size:20px;overflow-wrap:anywhere}.spendings-totals span,.spendings-totals label{font-size:13px;font-weight:650}
#spendings-section input,#spendings-section textarea{width:100%;max-width:100%;min-width:0;box-sizing:border-box;font-size:16px}
#spendings-section label{display:block;font-size:13px;font-weight:650;margin:4px 0}
#spendings-section h2{font-size:18px;margin:8px 0;text-align:center}
#spendings-status{text-align:center;font-size:14px}#spendings-status:empty{margin:0}#spendings-status.error{color:#b42318}
#spendings-list{display:grid;gap:8px;margin:10px 0}.spending-card{width:100%;display:grid;grid-template-columns:1fr auto;gap:5px;text-align:left;padding:10px;border:1px solid #dfe6f0;border-radius:10px;background:#f7f9ff;color:#102b7d;font:inherit;cursor:pointer;min-width:0}.spending-card>*{min-width:0;overflow-wrap:anywhere}.spending-card small{grid-column:1/-1;color:#46546e;font-size:13px}
#spendings-delete,#spendings-delete-yes{color:#b42318;border-color:#d6a4a0}#spendings-confirm{padding:8px;border:1px solid #d6a4a0;border-radius:10px}

/* Keep the date filter and property choices readable within the expense form. */
html body #spendings-section .spendings-property-field{grid-column:1/-1;min-width:0;width:100%}
html body #spendings-section .spendings-property-field .hub-visible-choices{width:100%;margin:8px 0}
html body #spendings-section .spendings-property-field .hub-visible-choices>button{white-space:normal;word-break:normal;overflow-wrap:normal;hyphens:none;min-height:52px;height:auto;font-size:14px;line-height:1.4}
html body #spendings-section .spendings-month-picker{display:flex;flex-direction:column;align-items:stretch;gap:4px;width:100%;margin:8px 0 12px;text-align:center}
html body #spendings-section #spendings-month{width:100%;min-width:0;min-height:44px;font-size:16px;padding:8px 12px}
html body #spendings-section .spendings-fields>div{display:flex;flex-direction:column;min-width:0}
html body #spendings-section .spendings-fields>div>label{text-align:center}
html body #spendings-section .spendings-fields>div>input,html body #spendings-section #spendings-notes{margin-top:auto;height:46px;min-height:46px;padding:8px 10px;line-height:1.4}
html body #spendings-section #spendings-notes{resize:vertical}

/* Only the Personal Properties list's Expenses view and inline Add form. */
body #expenses #spendings-section.property-list-expenses-view {
 & .spendings-property-filter-field > label,
 & #spendings-form:has(#spendings-delete[hidden]) .spendings-property-field > span {
  position:absolute; width:1px; height:1px; clip-path:inset(50%); overflow:hidden;
 }
 & .spendings-property-filter-field,
 & #spendings-form:has(#spendings-delete[hidden]) .spendings-property-field {
  & .hub-visible-choices {grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;margin-block:4px;}
  & .hub-visible-choices > button {grid-column:auto;width:100%;white-space:normal;overflow-wrap:anywhere;}
 }
 & .spendings-property-filter-field .hub-visible-choices > button[data-value=""] {
  grid-column:1/-1!important;justify-self:center;width:calc((100% - 6px)/2)!important;
 }
 & #spendings-form:has(#spendings-delete[hidden]) {
  padding-block:0;margin-block:4px;
  & h2 {margin-block:4px;}
  & .spendings-fields {grid-template-columns:repeat(2,minmax(0,1fr));row-gap:4px;}
  & .spendings-fields label {margin-block:0 2px;}
  & > .product-actions {margin-block:4px 0!important;}
 }
}
