.madecost-app { max-width: 1100px; margin-top: 12px; }
.madecost-title { margin-bottom: 12px; }
.madecost-loading { display: flex; align-items: center; gap: 8px; padding: 24px 0; }
.madecost-tabs { margin-bottom: 16px; }
.madecost-toasts .components-notice { margin: 0 0 8px; }
.madecost-section { margin-top: 8px; }
.madecost-section .description { color: #50575e; }
.madecost-empty { background: #fff; border: 1px solid #dcdcde; border-radius: 4px; padding: 16px 20px; max-width: 640px; }
.madecost-empty h2 { margin-top: 0; }
.madecost-empty ol { margin-left: 18px; list-style: decimal; }
.madecost-summary { margin: 14px 0 8px; font-size: 14px; }
.madecost-toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.madecost-table { margin-top: 4px; }
.madecost-table th, .madecost-table td { vertical-align: middle; }
.madecost-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.madecost-actions { white-space: nowrap; text-align: right; }
.madecost-badge { display: inline-block; white-space: nowrap; padding: 2px 8px; border-radius: 10px; font-size: 12px; background: #f0f0f1; color: #3c434a; }
.madecost-badge.is-to_write { background: #fcf9e8; color: #6e5300; }
.madecost-badge.is-incomplete { background: #fcf0f1; color: #8a2424; }
.madecost-badge.is-in_sync { background: #edfaef; color: #1a5c2c; }
.madecost-picker { background: #fff; border: 1px solid #dcdcde; border-radius: 4px; padding: 12px 16px; margin-bottom: 16px; max-width: 640px; }
.madecost-picker-results ul { margin: 8px 0 0; max-height: 220px; overflow: auto; }
.madecost-picker-results li { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0; padding: 6px 0; border-bottom: 1px solid #f0f0f1; }
.madecost-form { display: grid; gap: 16px; }
.madecost-form .has-error input { border-color: #d63638; }
.madecost-settings .madecost-form { max-width: 520px; }
.madecost-error { color: #b32d2e; margin: 4px 0; }
.madecost-modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
.madecost-editor-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 28px; }
@media (max-width: 960px) { .madecost-editor-grid { grid-template-columns: minmax(0, 1fr); } }
.madecost-editor-form { display: grid; gap: 14px; align-content: start; }
.madecost-editor-form h3, .madecost-editor-preview h3 { margin: 0 0 6px; }
.madecost-line { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto auto; gap: 8px; align-items: center; margin-bottom: 8px; }
.madecost-line-cost { font-size: 12px; color: #50575e; white-space: nowrap; }
.madecost-editor-preview { background: #f6f7f7; border-radius: 4px; padding: 14px 16px; align-self: start; }
.madecost-breakdown { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; margin: 0 0 14px; }
.madecost-breakdown dt, .madecost-breakdown dd { margin: 0; }
.madecost-breakdown dd { text-align: right; font-variant-numeric: tabular-nums; }
.madecost-breakdown .is-total { font-weight: 600; font-size: 15px; border-top: 1px solid #c3c4c7; padding-top: 6px; margin-top: 4px; }
.madecost-variants { margin-top: 4px; }
.madecost-editor .madecost-modal-actions { position: sticky; bottom: -32px; background: #fff; padding: 12px 0 0; margin-bottom: -8px; }
.madecost-cascade, .madecost-factors { margin-top: 12px; }
.madecost-factor-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; margin-bottom: 10px; }
.madecost-cascade h3, .madecost-factors h3 { margin: 0 0 6px; }
/* Notices float above the dialogs, so a message sent from inside a dialog is seen. */
.madecost-toasts { position: fixed; top: 44px; right: 20px; z-index: 100001; width: min(420px, calc(100vw - 40px)); }
