.performance-panel { min-width:0; padding:32px; border-radius:24px; background:#18181b; }
.performance-panel h2 { font-size:21px; font-weight:700; }
.performance-muted { color:#9ca3af; font-size:13px; line-height:1.7; }
.performance-result { font-size:clamp(32px,5vw,52px); font-weight:700; line-height:1.3; margin:12px 0; overflow-wrap:anywhere; }
.performance-positive { color:#34d399; }
.performance-negative { color:#f87171; }
.performance-heading { display:flex; justify-content:space-between; align-items:baseline; flex-wrap:wrap; gap:12px; }
.performance-lines { margin-top:24px; }
.performance-line { display:flex; justify-content:space-between; gap:20px; padding:14px 0; border-top:1px solid #303036; }
.performance-line > * { min-width:0; overflow-wrap:anywhere; }
.performance-line strong { text-align:end; }
.performance-panel details > summary { cursor:pointer; list-style:none; }
.performance-panel details > summary::-webkit-details-marker { display:none; }
.performance-panel details > summary::before { content:'\203A'; display:inline-block; margin-inline-end:10px; color:#fbbf24; }
.performance-panel details[open] > summary::before { transform:rotate(90deg); }
.performance-panel details[open] > summary { margin-bottom:16px; }
.performance-ledger-tools { display:flex; flex-wrap:wrap; gap:10px; margin:20px 0 12px; }
.performance-ledger-tools input { flex:1 1 220px; min-width:0; width:auto; }
.performance-ledger-tools select { max-width:100%; }
.performance-ledger-head, .performance-transaction > summary { display:grid; grid-template-columns:130px minmax(0,1fr) 130px 130px 16px; gap:16px; align-items:center; }
.performance-ledger-head { color:#9ca3af; font-size:12px; padding:12px 0; }
.performance-ledger-head span:nth-child(3), .performance-ledger-head span:nth-child(4) { text-align:end; }
.performance-transaction { border-top:1px solid #303036; }
.performance-panel .performance-transaction > summary { padding:18px 0; margin:0; list-style:none; }
.performance-panel .performance-transaction > summary::before { content:none; }
.performance-transaction summary > * { min-width:0; overflow-wrap:anywhere; }
.performance-item { display:block; font-size:14px; font-weight:600; }
.performance-subline { display:block; font-size:12px; color:#9ca3af; margin-top:4px; line-height:1.6; }
.performance-price, .performance-margin { text-align:end; font-size:14px; }
.performance-chevron { color:#fbbf24; transition:transform .15s; }
.performance-transaction[open] .performance-chevron { transform:rotate(90deg); }
.performance-transaction.is-void .performance-item, .performance-transaction.is-void .performance-price { text-decoration:line-through; color:#9ca3af; }
.performance-badge { display:inline-block; margin-inline-end:6px; padding:2px 7px; font-size:11px; font-weight:500; background:#303036; border-radius:4px; color:#d1d5db; }
.performance-badge.void { color:#fca5a5; background:#482020; }
.performance-detail { padding:18px 0 22px; border-top:1px dashed #3f3f46; }
.performance-fields { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:18px 24px; }
.performance-fields > div { min-width:0; overflow-wrap:anywhere; }
.performance-fields dt { color:#9ca3af; font-size:12px; margin-bottom:5px; }
.performance-fields dd { margin:0; font-size:14px; white-space:pre-wrap; overflow-wrap:anywhere; }
.performance-fields .performance-wide { grid-column:1/-1; }
.performance-actions { display:flex; flex-wrap:wrap; gap:12px; margin-top:20px; }
.performance-actions button { border:1px solid #52525b; border-radius:10px; padding:9px 16px; font-size:13px; }
.performance-actions button[data-action=cancel] { color:#fca5a5; border-color:#7f3030; }
.performance-category { border-top:1px solid #303036; }
.performance-panel .performance-category > summary { display:flex; align-items:center; padding:18px 0; margin:0; gap:12px; }
.performance-panel .performance-category > summary::before { flex:0 0 auto; margin:0; }
.performance-category-title { flex:1; min-width:0; }
.performance-category-total { text-align:end; overflow-wrap:anywhere; }
.performance-expense { padding:18px 0; border-top:1px dashed #303036; }
.performance-expense .performance-fields { margin-top:12px; }
.performance-note { padding-top:18px; margin-top:14px; border-top:1px solid #303036; }
.performance-note:empty { display:none; }
.performance-calculation { margin-top:20px; }
.performance-calculation > .grid { text-align:start; gap:0; display:block; }
.performance-calculation > .grid > div { display:flex; flex-wrap:wrap; align-items:baseline; gap:12px; justify-content:space-between; padding:14px 0; border-top:1px solid #303036; }
.performance-calculation > .grid > div > p { margin:0; }
.performance-calculation > .grid > div.hidden { display:none; }
.performance-calculation .text-4xl, .performance-calculation .text-2xl { font-size:20px; }
@media (max-width:900px) {
 .performance-ledger-head, .performance-transaction > summary { grid-template-columns:100px minmax(0,1fr) 110px 100px 12px; gap:12px; }
 .performance-fields { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:640px) {
 .performance-panel { padding:20px 16px; border-radius:20px; }
 .performance-ledger-head { display:none; }
 .performance-transaction > summary { grid-template-columns:minmax(0,1fr) minmax(0,1fr) 14px; gap:8px 12px; }
 .performance-transaction .performance-date { grid-column:1/3; }
 .performance-transaction .performance-product { grid-column:1/3; grid-row:2; }
 .performance-transaction .performance-price { grid-column:1; grid-row:3; text-align:start; }
 .performance-transaction .performance-margin { grid-column:2; grid-row:3; }
 .performance-transaction .performance-chevron { grid-column:3; grid-row:2; }
 .performance-fields { gap:16px; }
 .performance-category-total { max-width:45%; }
}
@media (prefers-reduced-motion:reduce) { .performance-chevron { transition:none; } }
