.events-tabs{display:flex;gap:10px;flex-wrap:wrap;margin:0 0 23px}.event-editor h3{margin-top:27px}.event-editor h3:first-child{margin-top:0}.event-invoice-line{background:#f7f9f5;border:1px solid #e2e9dd;border-radius:9px;margin:16px 0;padding:17px}.event-invoice-line-fields>.field:first-of-type{grid-column:1/-1}.event-invoice-line .field{margin-bottom:12px}.event-invoice-line .event-remove-line{align-self:end;justify-self:start;margin-bottom:12px}.event-invoice-totals{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin:22px 0;padding:18px;background:#edf3e8;border-radius:9px}.event-invoice-totals span{display:block;font-size:calc(13px + var(--workspace-font-increase, 0px));color:#64755d}.event-invoice-totals strong{display:block;font-size:calc(20px + var(--workspace-font-increase, 0px));margin-top:6px;color:#314c2f}.event-invoice-preview iframe{display:block;width:100%;height:650px;border:1px solid #d9e3dc;border-radius:7px;background:#fff}.event-editor #event-add-menu-price{white-space:normal;text-align:left;line-height:1.5}@media(max-width:760px){.event-invoice-line{padding:14px}.event-invoice-line-fields{grid-template-columns:1fr 1fr}.event-invoice-totals{grid-template-columns:1fr 1fr}.event-invoice-totals strong{font-size:calc(18px + var(--workspace-font-increase, 0px))}.event-invoice-preview iframe{height:65vh}}@media(max-width:420px){.event-invoice-line-fields{grid-template-columns:1fr}.event-invoice-line .field:first-of-type{grid-column:auto}.events-tabs>.btn{flex:1}}

.event-invoice-line-fields{display:grid;grid-template-columns:1.1fr 1fr 1fr;gap:0 14px;margin-top:16px}.event-invoice-line-details>summary{cursor:pointer;font-weight:600;overflow-wrap:anywhere}.event-invoice-line-details:not([open])>.event-invoice-line-fields{display:none}@media(max-width:760px){.event-invoice-line-fields{grid-template-columns:1fr 1fr}}@media(max-width:420px){.event-invoice-line-fields{grid-template-columns:1fr}}
.event-production-plan{margin:22px 0;padding:18px;border:1px solid #dbe5d4;border-radius:9px;background:#fafcf8}.event-production-plan h3{margin-top:0}.event-production-plan>.row-actions{display:flex;gap:10px;flex-wrap:wrap}.event-recipe-plan{width:100%;border-collapse:collapse}.event-recipe-plan th,.event-recipe-plan td{text-align:left;padding:12px 8px;border-bottom:1px solid #dfe7db;vertical-align:top}.event-recipe-plan td:first-child{min-width:140px}.event-recipe-plan small{display:block;margin-top:5px;color:#64755d}.event-recipe-plan input{min-width:100px;max-width:140px}.event-recipe-plan .btn{font-size:calc(12px + var(--workspace-font-increase,0px));white-space:normal}.event-production-plan input[readonly]{background:#eef1ec}.event-plan-statistics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:18px 0}.event-plan-statistics>div{padding:12px;background:#edf3e8;border-radius:6px;overflow-wrap:anywhere}.event-plan-statistics span{display:block;font-size:calc(12px + var(--workspace-font-increase,0px));color:#64755d}.event-plan-statistics strong{display:block;margin-top:4px;font-size:calc(18px + var(--workspace-font-increase,0px));color:#314c2f}.event-production-plan #event-charge-selection{margin:18px 0;padding:14px;border:1px solid #d2ddc8;border-radius:7px}.event-production-plan #event-plan-disposables{margin:16px 0}.event-production-plan #event-plan-disposables summary{cursor:pointer;font-weight:600}.event-production-plan [hidden]{display:none!important}@media(max-width:760px){.event-production-plan{padding:14px}.event-plan-statistics{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:420px){.event-plan-statistics{grid-template-columns:1fr}.event-production-plan>.row-actions>.btn{width:100%}}

/* Both create and edit use the same generous dialog. Content reflows inside
   the available workspace rather than making the dialog scroll sideways. */
#modal-root .modal-backdrop:has(.event-editor){left:0}
#modal-root .modal.dialog:has(.event-editor){width:min(1560px,100%);max-height:calc(100vh - 64px);max-height:calc(100dvh - 64px)}
#modal-root .modal.dialog:has(.event-editor) .modal-body{padding:24px}
.event-editor,.event-editor .field,.event-editor .form-grid>*,.event-editor .event-invoice-line-fields>*{min-width:0;max-width:100%;box-sizing:border-box}
.event-editor input,.event-editor select,.event-editor textarea{min-width:0;max-width:100%;box-sizing:border-box}
.event-editor summary,.event-editor label,.event-editor td,.event-editor th,.event-invoice-totals strong{overflow-wrap:anywhere}
.event-editor .event-invoice-line-fields{grid-template-columns:repeat(3,minmax(0,1fr))}
.event-production-plan .table-wrap{overflow-x:visible}
.event-recipe-plan{table-layout:fixed}
.event-recipe-plan th:first-child{width:28%}
.event-recipe-plan th:nth-child(2){width:16%}
.event-recipe-plan td:first-child{min-width:0}
.event-recipe-plan input{width:100%;min-width:0}
.event-recipe-plan .sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);clip-path:inset(50%);white-space:nowrap;border:0}
@media(max-width:1100px){
 .event-recipe-plan thead{display:none}
 .event-recipe-plan,.event-recipe-plan tbody{display:block;width:100%}
 .event-recipe-plan tr{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);margin:14px 0;padding:10px;border:1px solid #dfe7db;border-radius:8px}
 .event-recipe-plan td{display:block;min-width:0;border:0;padding:8px}
 .event-recipe-plan td:first-child{grid-column:1/-1}
 .event-recipe-plan td:nth-child(2)::before{content:'Batches';display:block;font-size:calc(12px + var(--workspace-font-increase,0px));color:#64755d}
 .event-recipe-plan td:nth-child(3)::before{content:'Recipe yield';display:block;font-size:calc(12px + var(--workspace-font-increase,0px));color:#64755d}
 .event-recipe-plan td:nth-child(4)::before{content:'Planned food cost';display:block;font-size:calc(12px + var(--workspace-font-increase,0px));color:#64755d}
 .event-recipe-plan td:last-child .btn{max-width:100%}
}
@media(max-width:760px){
 #modal-root .modal.dialog:has(.event-editor){max-height:calc(100vh - 92px);max-height:calc(100dvh - 92px)}
 #modal-root .modal.dialog:has(.event-editor) .modal-body{padding:16px}
 .event-editor .event-invoice-line-fields{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:420px){
 .event-editor .event-invoice-line-fields,.event-recipe-plan tr{grid-template-columns:minmax(0,1fr)}
 .event-recipe-plan td:first-child{grid-column:auto}
}
