.production-calculator { border-top: 1px solid var(--border-color); margin-top: 20px; padding-top: 20px; }
.production-calculator h3 { margin-bottom: 8px; }
.production-calculator p { margin: 12px 0; line-height: 1.5; }
.cost-breakdown { margin: 12px 0; }
.cost-line { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--border-color); }
.cost-line dt { font-weight: 600; }
.cost-line small { display: block; font-size: .75rem; color: var(--text-muted); font-weight: 400; margin-top: 4px; overflow-wrap: anywhere; }
.cost-line dd { font-weight: 700; white-space: nowrap; margin: 0; }
.cost-total { background: var(--primary-alpha); padding: 14px 12px; border-radius: 8px; margin-top: 8px; }
.cost-total:last-child { color: var(--primary); font-size: 1.1rem; }
#cost-error { color: var(--error, #c0392b); }
.filament-editor { margin: 18px 0; padding: 16px; background: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: 12px; }
.filament-row { display: grid; grid-template-columns: minmax(0, 1fr) 110px auto; align-items: end; gap: 12px; margin-bottom: 16px; }
.filament-row .form-group { min-width: 0; margin-bottom: 0; }
.filament-remove { min-height: 44px; }
.filament-remove span { display: none; }
.filament-line-cost { grid-column: 1 / -1; line-height: 1.5; }
.cost-extras { border: 1px solid var(--border-color); padding: 14px; border-radius: 10px; margin: 14px 0; }
.cost-extras summary { cursor: pointer; padding: 8px 0; font-weight: 600; }
.quote-commercial { margin-top: 24px; border-top: 1px solid var(--border-color); padding-top: 20px; }
.quote-auto { display: flex; align-items: center; gap: 10px; min-height: 48px; margin: 10px 0; }
.quote-auto input { width: 22px; height: 22px; }
.quote-footer-total { flex-basis: 100%; font-weight: 600; }
.quotes-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px),1fr)); gap: 18px; }
.quote-card { background: var(--bg-card); border: 1px solid var(--border-color); padding: 20px; border-radius: 14px; min-width: 0; }
.quote-card p { margin: 10px 0; overflow-wrap: anywhere; }
.quote-card-top { display: flex; gap: 12px; align-items: start; justify-content: space-between; flex-wrap: wrap; }
.quote-card h2 { font-size: 1.1rem; }
.quote-sale { font-size: 1.65rem; font-weight: 700; color: var(--primary); }
.quote-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.quote-document { color: var(--text-primary); line-height: 1.7; overflow-wrap: anywhere; }
.work-modal .modal { width: min(820px, 96vw); max-width: 820px; display: flex; flex-direction: column; max-height: 92dvh; }
.work-modal .modal-body { overflow-y: auto; min-height: 0; overscroll-behavior: contain; }
.work-modal .modal-header, .work-modal .modal-footer { flex-shrink: 0; }
.work-modal .modal-footer { flex-wrap: wrap; background: var(--bg-card); padding-bottom: max(16px, env(safe-area-inset-bottom)); }
@media (max-width: 640px) {
    .admin-layout .btn, .admin-layout .sidebar-link, .modal .btn { min-height: 44px; }
    .admin-layout .form-input, .admin-layout .form-select, .modal .form-input, .modal .form-select, .modal .form-textarea { font-size: 16px; min-height: 44px; }
    .work-modal { padding: 0; align-items: stretch; }
    .work-modal .modal { width: 100%; max-width: 100%; height: 100dvh; max-height: 100dvh; margin: 0; border-radius: 0; }
    .work-modal .modal-header { padding: 12px 16px; }
    .work-modal .modal-body { padding: 16px; }
    .work-modal .modal-footer { padding: 12px 16px max(12px, env(safe-area-inset-bottom)); gap: 10px; }
    .work-modal .modal-footer > .btn { flex: 1; }
    .filament-editor { padding: 12px; }
    .filament-row { grid-template-columns: minmax(0, 1fr) 90px; gap: 8px; padding-bottom: 12px; border-bottom: 1px solid var(--border-color); }
    .filament-row > .form-group:first-child { grid-column: 1 / -1; }
    .filament-remove { align-self: end; }
    .filament-remove span { display: inline; }
    .cost-line { gap: 10px; }
    .cost-line dt { min-width: 0; }
    .quote-actions > .btn { flex: 1 1 120px; }
    .page-header-row { flex-wrap: wrap; gap: 12px; }
}
@media(max-width: 600px) { .production-calculator .form-row-3 { display: grid; grid-template-columns: 1fr 1fr; } .production-calculator .form-row-3 > :last-child { grid-column: 1 / -1; } }
