/* Bed review: one question, one action row, secondary edits kept compact. */
.model-annotation-review .bed-position-card{display:grid;gap:16px;text-align:left}
.model-annotation-review .bed-position-card .bed-residents{border:0;padding:0;margin:0;background:transparent;min-width:0}
.bed-position-card .bed-residents legend{font-size:16px;font-weight:700;padding:0;margin-bottom:10px;color:var(--ui-text)}
.bed-use-state,.bed-person-choices,.bed-add-person{display:flex;align-items:center;flex-wrap:wrap;gap:8px}
.bed-use-state{margin-bottom:10px}
.bed-position-card button,.bed-person-choices label{min-height:38px;font-size:14px!important;line-height:1.4}
.bed-use-state button[aria-pressed=true]{background:var(--ui-primary);color:#fff;border-color:var(--ui-primary)}
.bed-person-choices label{display:flex;align-items:center;gap:6px;padding:7px 10px;border:1px solid var(--ui-border);border-radius:8px;background:#fff;cursor:pointer;box-sizing:border-box}
.bed-person-choices label.selected{background:#e8f4f3;border-color:var(--ui-primary);color:var(--ui-primary)}
.bed-person-choices input[type=checkbox]{width:16px;height:16px;min-height:0;margin:0;accent-color:var(--ui-primary)}
.bed-person-choices label:has(input:disabled){opacity:.55;cursor:default}
.bed-add-person{margin-top:10px}.bed-add-person input{min-width:100px;flex:1;width:auto}
.bed-position-card .bed-pillow-check{border-top:1px solid var(--ui-border);padding-top:14px}
.bed-position-card .bed-pillow-check h4{font-size:17px!important;margin:0 0 5px;color:var(--ui-primary);line-height:1.55}
.bed-position-card .bed-pillow-check p{font-size:14px;margin:0;color:var(--ui-text-secondary)}
.bed-position-card .bed-step-alert{font-size:13px!important;line-height:1.55;color:#b42e26!important;margin:8px 0 0!important}
.bed-name-edit{font-size:13px}.bed-name-edit summary{color:var(--ui-text-secondary);cursor:pointer;padding:2px 0}
.bed-name-edit label{display:grid;gap:6px;margin-top:8px}.bed-name-edit input{width:100%;box-sizing:border-box}
.bed-name-edit small{display:block;margin-top:5px;color:var(--ui-text-secondary)}
.bed-shared-positions{display:grid;gap:8px;margin-top:10px}
.bed-shared-positions>div{display:flex;align-items:center;justify-content:space-between;gap:8px;background:#fff;border:1px solid var(--ui-border);border-radius:8px;padding:8px 10px}
.bed-shared-positions span{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.bed-shared-positions small{color:var(--ui-text-secondary)}
.resident-dot{display:inline-block;width:10px;height:10px;border-radius:50%;background:#2584d3}.resident-dot.resident-1{background:#b84e9b}
.model-review-footer .bed-position-actions{grid-column:1/-1;display:flex;width:100%;gap:12px;justify-content:space-between;align-items:stretch;order:1}
.model-review-footer .bed-position-actions button{min-height:46px;padding:10px 16px;font-size:15px!important;white-space:normal}
.model-review-footer .bed-position-confirm{flex:1;max-width:70%;margin-left:auto}
.model-review-footer:has(.bed-position-actions) .review-drawing-reminder{grid-column:1/-1;order:2}
.model-review-footer .bed-more-actions{grid-column:1/-1;order:8;margin:0;font-size:13px;padding-top:4px}
.bed-more-actions .danger{margin-left:auto}
.bed-more-actions>div{display:flex;gap:8px;flex-wrap:wrap;padding:10px 0 4px}.bed-more-actions button{font-size:13px!important;min-height:36px}
.workflow-feedback-button{white-space:nowrap;font-size:13px;padding:6px 10px}

/* Native dialogs keep focus inside and leave the original workbench unchanged. */
.feedback-editor{width:min(620px,calc(100vw - 32px));max-height:calc(100dvh - 40px);padding:0;border:1px solid var(--ui-border);border-radius:14px;color:var(--ui-text);background:#fff;box-sizing:border-box;box-shadow:0 18px 70px #17383f40;overflow:hidden}
.feedback-editor[open]{display:flex;flex-direction:column}
.feedback-editor::backdrop,.feedback-image-preview::backdrop{background:#18313b80}
.feedback-editor>header{display:flex;justify-content:space-between;align-items:flex-start;padding:18px 22px 14px;border-bottom:1px solid var(--ui-border);gap:12px;flex-shrink:0}
.feedback-editor h3{margin:0;font-size:21px}.feedback-editor>header p{margin:5px 0 0;font-size:14px;color:var(--ui-text-secondary)}
.feedback-editor-body{overflow:auto;padding:16px 22px;display:grid;gap:16px;min-height:0;overscroll-behavior:contain}
.feedback-context{display:flex;gap:4px 12px;flex-wrap:wrap;background:#f2f7f8;border-radius:8px;padding:10px 12px;font-size:14px}
.feedback-context small{flex-basis:100%;color:var(--ui-text-secondary);font-size:12px}
.feedback-selects{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.feedback-selects label,.feedback-description{display:block;font-size:14px;font-weight:600}
.feedback-selects select{display:block;margin-top:6px;width:100%;min-width:0;min-height:40px;box-sizing:border-box;font-size:14px}
.feedback-description textarea{display:block;margin-top:6px;width:100%;min-height:105px;max-height:250px;resize:vertical;font:inherit;font-weight:400;line-height:1.6;padding:10px 12px;box-sizing:border-box;border:1px solid var(--ui-border);border-radius:8px}
.feedback-description>small{display:block;text-align:right;margin-top:4px;font-weight:400;color:var(--ui-text-secondary)}
.feedback-attachment-head{display:flex;align-items:center;gap:10px;font-size:14px}.feedback-attachment-head>span{color:var(--ui-text-secondary)}
.feedback-attachment-head>button{margin-left:auto}.feedback-attachments>p{margin:7px 0 0;color:var(--ui-text-secondary);font-size:12px}
.feedback-editor button{font-size:14px;min-height:38px}
.feedback-editor>footer{display:flex;justify-content:space-between;gap:12px;padding:12px 22px;border-top:1px solid var(--ui-border);background:#fff;flex-shrink:0}
.feedback-editor>footer>button:last-child{min-width:140px}
.feedback-error{color:#b42e26;margin:0;font-size:14px}
.feedback-image-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(100px,1fr));gap:10px;margin-top:12px}
.feedback-image-grid figure{margin:0;min-width:0;padding:6px;border:1px solid var(--ui-border);border-radius:8px;background:#f7fafb}
.feedback-image-grid .feedback-thumb{display:block;width:100%;padding:0;min-height:0;border:0;background:#edf2f4;overflow:hidden;border-radius:5px}
.feedback-thumb img{display:block;width:100%;height:92px;object-fit:contain}.feedback-image-grid figcaption{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;margin:5px 0;font-size:12px;color:var(--ui-text-secondary)}
.feedback-image-grid figure>.ghost{padding:3px 8px;min-height:28px;font-size:12px}
.feedback-image-preview{width:min(1100px,calc(100vw - 28px));max-height:calc(100dvh - 28px);border:1px solid var(--ui-border);border-radius:12px;background:#fff;color:var(--ui-text);padding:14px;box-sizing:border-box}
.feedback-image-preview header{display:flex;gap:14px;justify-content:space-between;align-items:center;margin-bottom:10px}.feedback-image-preview header>span{overflow-wrap:anywhere;min-width:0;font-size:14px}.feedback-image-preview header>button{flex-shrink:0}
.feedback-image-preview>img{display:block;width:100%;max-height:calc(100dvh - 130px);object-fit:contain}
.feedback-saved-images{border-top:1px solid var(--ui-border);padding:14px 0;margin-top:16px}.feedback-saved-images h4{margin:0}
.feedback-saved-images .feedback-image-grid{grid-template-columns:repeat(auto-fill,minmax(130px,180px))}.feedback-saved-images .feedback-thumb img{height:120px}
.my-feedback-entry{display:inline-flex}
.feedback-history{width:min(780px,calc(100vw - 32px))}
.feedback-history-item{border:1px solid var(--ui-border);border-radius:10px;min-width:0}
.feedback-history-item>summary{display:flex;flex-wrap:wrap;gap:6px 14px;cursor:pointer;padding:14px;background:#f4f8f8;border-radius:10px;overflow-wrap:anywhere}
.feedback-history-item>summary strong{flex-basis:100%}
.feedback-history-item>summary span{font-size:13px;color:var(--ui-text-secondary)}
.feedback-history-detail{padding:14px;min-width:0}
.feedback-history-detail h4,.feedback-replies h4{margin:0 0 8px}
.feedback-plain-text{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.65;margin:8px 0}
.feedback-history-detail blockquote{padding:12px;background:#f7f8fa;border-left:3px solid var(--ui-border)}
.feedback-replies{border-top:1px solid var(--ui-border);margin-top:16px;padding-top:14px}
.feedback-replies article{padding:10px 12px;margin:10px 0;background:#eff7f6;border-radius:8px}
.feedback-replies article>header{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;font-size:13px}
.feedback-replies time{color:var(--ui-text-secondary)}
.feedback-reply-editor{border-top:1px solid var(--ui-border);margin-top:16px;padding:16px 0;min-width:0}
.feedback-state-note{font-size:13px;line-height:1.6;color:var(--ui-text-secondary);margin:8px 0 12px}
@media(max-width:600px){
 .feedback-editor{width:calc(100vw - 20px);max-height:calc(100dvh - 20px)}
 .feedback-editor>header,.feedback-editor>footer,.feedback-editor-body{padding-left:14px;padding-right:14px}
 .feedback-selects{gap:8px}.feedback-image-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
 .model-review-footer .bed-position-actions{gap:8px}.model-review-footer .bed-position-actions button{padding:10px;font-size:14px!important}
 .bed-position-card .bed-pillow-check h4{font-size:16px!important}
}

/* Feedback threads: date and summary outside, chronological conversation inside. */
.feedback-history-item>summary time{flex-basis:100%;font-size:12px;color:var(--ui-text-secondary)}
.feedback-conversation{display:flex;flex-direction:column;gap:14px;list-style:none;margin:0;padding:0;min-width:0}
.feedback-message{max-width:92%;min-width:0;box-sizing:border-box;border:1px solid var(--ui-border);border-radius:12px;background:#f5f7f8;padding:12px 14px;align-self:flex-start}
.feedback-message-admin{align-self:flex-end;background:#edf7f5;border-color:#cfe3df}
.feedback-message>header{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;font-size:13px}
.feedback-message time{font-size:12px;color:var(--ui-text-secondary)}
.feedback-message .feedback-saved-images{border:0;padding:0;margin:10px 0 0}
.feedback-message .feedback-image-grid{grid-template-columns:repeat(auto-fill,minmax(95px,130px));min-width:min(260px,100%)}
.feedback-message .feedback-saved-images h4{font-size:12px;color:var(--ui-text-secondary);font-weight:400}
.feedback-compose-actions{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin-top:8px}
.feedback-compose-actions>button:last-child{margin-left:auto;min-width:88px}
.feedback-compose-actions small{font-size:12px;color:var(--ui-text-secondary)}
.feedback-reply-editor .feedback-description textarea{min-height:78px}
@media(max-width:600px){.feedback-message{max-width:97%;padding:10px}.feedback-message>header{gap:6px}.feedback-conversation{gap:10px}}
