.model-cost-panel { --cost-border: #e5d7c4; --cost-muted: #73695c; --cost-accent: #79562b; --cost-surface: #faf7f0; }
.model-cost-panel [hidden] { display: none !important; }
.model-cost-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 20px; }
.model-cost-heading h2 { margin: 6px 0 8px; }
.model-cost-heading p { margin: 0; max-width: 720px; }
.model-cost-private { flex-shrink: 0; padding: 6px 10px; border: 1px solid var(--cost-border); color: var(--cost-accent); background: var(--cost-surface); border-radius: 6px; font-size: 12px; }
.model-cost-filters { display: grid; grid-template-columns: minmax(160px, 1.6fr) repeat(2, minmax(120px, 1fr)) repeat(2, minmax(104px, .8fr)) auto; gap: 12px; align-items: end; padding: 16px; background: var(--cost-surface); border: 1px solid var(--cost-border); border-radius: 8px; }
.model-cost-filters label { display: grid; gap: 6px; min-width: 0; color: #655948; font-size: 12px; font-weight: 600; }
.model-cost-panel input, .model-cost-panel select, .model-cost-panel textarea { box-sizing: border-box; width: 100%; min-width: 0; border: 1px solid var(--cost-border); border-radius: 6px; padding: 9px 10px; background: #fff; color: #27231e; font: inherit; font-size: 14px; line-height: 1.5; }
.model-cost-panel input, .model-cost-panel select { height: 40px; }
.model-cost-filter-actions { display: flex; gap: 8px; }
.model-cost-panel .btn { white-space: nowrap; min-height: 40px; }
.model-cost-panel :is(input, select, textarea, button):focus-visible, .model-cost-table-wrap:focus-visible { outline: 2px solid var(--cost-accent); outline-offset: 2px; }
.model-cost-message { min-height: 0; margin: 12px 0 0; color: #416742; font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; }
.model-cost-message:empty { display: none; }
.model-cost-message.is-error { color: #a42d25; }
.model-cost-summary { padding: 14px 0 10px; font-size: 13px; color: var(--cost-muted); }
.model-cost-table-wrap { overflow-x: auto; border: 1px solid var(--cost-border); border-radius: 8px; }
.model-cost-table { width: 100%; min-width: 960px; border-collapse: collapse; table-layout: fixed; text-align: left; }
.model-cost-table th { padding: 12px; color: #65533b; background: #f4ecdf; font-size: 12px; font-weight: 600; }
.model-cost-table th:nth-child(1) { width: 14%; }
.model-cost-table th:nth-child(2), .model-cost-table th:nth-child(4) { width: 13%; }
.model-cost-table th:nth-child(3), .model-cost-table th:nth-child(5) { width: 24%; }
.model-cost-table th:nth-child(6) { width: 12%; }
.model-cost-table th span { display: block; font-weight: 400; color: var(--cost-muted); margin-top: 3px; }
.model-cost-table td { padding: 10px 12px; border-top: 1px solid var(--cost-border); vertical-align: middle; font-size: 14px; }
.model-cost-table tbody tr:hover { background: #fdfbf7; }
.model-cost-name { display: block; font-weight: 600; overflow-wrap: anywhere; }
.model-cost-dirty { display: block; font-size: 11px; color: #8c5b18; margin-top: 4px; }
.model-cost-table textarea { display: block; min-height: 42px; height: 42px; max-height: 200px; resize: vertical; line-height: 1.6; }
.model-cost-table textarea:focus { height: 112px; }
.model-cost-row-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.model-cost-undo { background: transparent; border: 0; padding: 6px 4px; color: var(--cost-muted); font: inherit; font-size: 12px; cursor: pointer; }
.model-cost-panel .model-cost-empty { text-align: center; padding: 36px 16px; color: var(--cost-muted); }
.model-cost-panel [disabled] { opacity: .6; cursor: not-allowed; }
@media (max-width: 1200px) { .model-cost-filters { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 600px) { .model-cost-heading { flex-wrap: wrap; } .model-cost-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 12px; } .model-cost-filters label:first-child { grid-column: 1 / -1; } .model-cost-filter-actions { align-self: end; } }
@media (max-width: 600px) {
  body.model-costs-mode .admin-shell { grid-template-columns: minmax(0, 1fr); }
  body.model-costs-mode .admin-side { position: static; height: auto; }
  body.model-costs-mode .admin-tabs { position: static; display: flex; gap: 8px; overflow-x: auto; }
  body.model-costs-mode .admin-tabs .tab-btn { flex: 0 0 auto; width: auto; }
  body.model-costs-mode .admin-main { min-width: 0; }
  body.model-costs-mode .model-cost-panel { padding: 16px; }
}
