/* Scoped to the new module editor and renderer. Existing pages keep their styles. */
.yw-work-modules { min-width:0; color:inherit; }
.yw-work-modules .wm-editor,.yw-work-modules .wm-member { min-width:0; }
.yw-work-modules .wm-toolbar,.yw-work-modules .wm-card-actions { display:flex; flex-wrap:wrap; gap:8px; margin:12px 0; align-items:center; }
.yw-work-modules .wm-pages { display:contents; }
.yw-work-modules .wm-card,.yw-work-modules .wm-module,.yw-work-modules .wm-dialog,.yw-work-modules .wm-member { border:1px solid #dce3db; border-radius:14px; padding:18px; margin:10px 0; background:#fff; overflow-wrap:anywhere; }
.yw-work-modules .wm-card-heading { display:flex; flex-wrap:wrap; align-items:center; gap:12px; }
.yw-work-modules .wm-card-heading span { color:#65786e; font-size:13px; }
.yw-work-modules .wm-insertion { display:flex; justify-content:center; min-height:26px; }
.yw-work-modules .wm-insertion button { font-size:12px; line-height:1.4; padding:4px 9px; min-height:0; background:transparent; border:1px dashed #c8d5ca; border-radius:6px; color:#32604e; }
.yw-work-modules .wm-card-actions button { font-size:13px; padding:5px 10px; min-height:30px; }
.yw-work-modules .wm-dialog { background:#f6f8f4; }
.yw-work-modules .wm-dialog label,.yw-work-modules .wm-label { display:block; margin:12px 0 6px; }
.yw-work-modules .wm-dialog input:not([type=checkbox]):not([type=radio]),.yw-work-modules .wm-dialog select,.yw-work-modules .wm-dialog textarea,.yw-work-modules .wm-module textarea,.yw-work-modules .wm-module input:not([type=checkbox]):not([type=radio]) { box-sizing:border-box; width:100%; max-width:100%; }
.yw-work-modules input[type=checkbox],.yw-work-modules input[type=radio] { width:18px!important; height:18px!important; min-width:18px; min-height:18px; padding:0; flex:0 0 18px; margin:0 8px 0 0; vertical-align:middle; }
.yw-work-modules .wm-module-menu { display:flex; flex-wrap:wrap; gap:8px; }
.yw-work-modules .wm-option-row { display:flex; align-items:center; gap:8px; margin:8px 0; }
.yw-work-modules .wm-option-row input { flex:1; min-width:0; }
.yw-work-modules .wm-option-row button { flex:none; }
.yw-work-modules .wm-text { white-space:pre-wrap; }
.yw-work-modules .wm-media { display:block; max-width:100%; max-height:520px; object-fit:contain; margin:10px 0; }
.yw-work-modules .wm-repeat-row { border-left:3px solid #d6e3d5; padding:8px 12px; margin:10px 0; }
.yw-work-modules .wm-dimensions { display:flex; gap:10px; }
.yw-work-modules .wm-dimensions label { flex:1; min-width:0; }
.yw-work-modules fieldset { min-width:0; border:0; padding:0; }
.yw-work-modules fieldset>label { display:flex; align-items:center; gap:8px; margin:8px 0; }
.yw-work-modules [data-wm-error],.yw-work-modules [data-wm-dialog-error] { color:#a33d27; white-space:pre-wrap; }
.yw-work-modules [hidden] { display:none!important; }
.wm-work-actions { display:inline-flex; flex-direction:column; align-items:flex-start; gap:6px; }
.wm-work-actions>span { display:flex; gap:12px; }
.wm-work-state { font-size:14px; margin:0 16px; }
.wm-work-state:empty { display:none; }
.wm-lifecycle-dialog { max-width:520px; padding:16px; }
.wm-lifecycle-dialog [role=alert] { color:#a33d27; }
.wm-attendance-batch fieldset { display:flex; flex-wrap:wrap; gap:12px; margin:8px 0; }
.wm-attendance-batch label { display:inline-flex; align-items:center; gap:6px; }
.wm-attendance-batch input[type=checkbox] { width:18px!important; height:18px!important; min-width:18px; flex:0 0 18px; margin:0; }
.wm-attendance-batch [role=alert] { color:#a33d27; }
@media(max-width:600px) {
 .yw-work-modules .wm-card,.yw-work-modules .wm-module,.yw-work-modules .wm-dialog,.yw-work-modules .wm-member { padding:12px; }
 .yw-work-modules .wm-pages button { font-size:14px; padding:8px; }
}

.yw-work-modules .wm-member-toggle{display:flex;justify-content:space-between;align-items:center;width:100%;text-align:left;font:inherit;color:inherit;background:transparent;border:0;padding:10px}.yw-work-modules [data-wm-member-content][hidden]{display:none!important}

/* Module internals share the approved work-page scale. */
.yw-work-modules .wm-module{border-color:var(--ui-line,#DDDCD5);border-radius:12px;padding:16px;box-shadow:none}
.yw-work-modules :is(.wm-label,legend,h3){font-size:16px;font-weight:600;line-height:1.5}
.yw-work-modules .wm-module>h3{margin:0 0 8px}
.yw-work-modules :is(.wm-help,.wm-upload-status){font-size:13px;color:var(--ui-muted,#686D63)}
.yw-work-modules :is(.wm-label,legend,h3) small{font-size:12px;font-weight:400;color:#A63828}
.yw-work-modules .wm-file{display:flex;align-items:center;flex-wrap:wrap;gap:8px;padding:12px 0;border-top:1px solid var(--ui-line,#DDDCD5);overflow-wrap:anywhere}
.yw-work-modules .wm-file>a{flex:1;min-width:80px}
.yw-work-modules .wm-file button{flex:none}
.yw-work-modules .wm-repeat-row{border-left-color:var(--ui-brand,#64744A);padding:8px 12px}
.yw-work-modules .wm-member{border-color:var(--ui-line,#DDDCD5);border-radius:12px;box-shadow:none}
.yw-work-modules .wm-member .wm-module{border:0;border-bottom:1px solid var(--ui-line,#DDDCD5);border-radius:0;padding:12px 0}
.yw-work-modules .wm-file-dialog{box-sizing:border-box;width:min(90vw,640px);max-height:90vh;overflow:auto;border:1px solid var(--ui-line,#DDDCD5);border-radius:12px;padding:16px;background:#fff;color:var(--ui-ink,#252821);overflow-wrap:anywhere}
.yw-work-modules .wm-file-dialog::backdrop{background:#25282199}
.yw-work-modules .wm-file-dialog :is(img,video){display:block;max-width:100%;max-height:60vh;object-fit:contain;margin:12px auto}
.yw-work-modules .wm-file-dialog>button{float:right}
.yw-work-modules .wm-module:has(>[data-wm-business="basic"]:empty){display:none}

.yw-work-modules .wm-attachment-group{background:#fff;border:1px solid var(--ui-line,#DDDCD5);border-radius:12px;padding:16px;margin:16px 0;min-width:0}
.yw-work-modules .wm-attachment-group>h3{margin:0 0 12px;font-size:16px}
.yw-work-modules .wm-attachment-group>.wm-module{border:0;border-top:1px solid var(--ui-line,#DDDCD5);border-radius:0;padding:12px 0 0;margin:12px 0 0;background:transparent}
.yw-work-modules .wm-attachment-group>.wm-module>h3{font-size:14px;margin:0 0 4px}
.yw-work-modules .wm-attachment-group>.wm-module>p{font-size:13px;color:var(--ui-muted,#686D63);margin:4px 0}

/* M01—M13 align with the confirmed review rather than wrapping every heading as a card. */
.yw-work-modules .wm-module{margin:0 0 16px;line-height:1.65}
.yw-work-modules .wm-text{font-size:15px;line-height:1.65;margin:8px 0;white-space:pre-wrap}
.yw-work-modules [data-wm-kind=heading]{background:transparent;border:0;border-bottom:1px solid var(--ui-line,#DDDCD5);border-radius:0;padding:6px 0;margin:0 0 16px;box-shadow:none}
.yw-work-modules [data-wm-kind=heading]>h3{margin:0}
.yw-work-modules :is([data-wm-input-kind=number],[data-wm-input-kind=money]) textarea{min-height:40px!important;height:40px!important;resize:none}
.yw-work-modules .wm-repeat-row{border:1px solid var(--ui-line,#DDDCD5);border-radius:8px;padding:12px;margin:0 0 10px;background:#fff}
.yw-work-modules .wm-repeat-row>p{font-size:15px;font-weight:550;margin:0 0 12px}
.yw-work-modules .wm-media{border-radius:8px}
.yw-work-modules .wm-reference{display:block;padding:10px 0;border-bottom:1px solid var(--ui-line,#DDDCD5);overflow-wrap:anywhere;font-size:15px}

.yw-work-modules .wm-module :is(input:not([type=checkbox]):not([type=radio]):not([type=file]),select,textarea){font:15px/1.65 system-ui,-apple-system,'Microsoft YaHei',sans-serif;border:1px solid var(--ui-line,#DDDCD5);border-radius:8px;background:#fff;color:var(--ui-ink,#252821);padding:7px 10px;box-sizing:border-box}
.yw-work-modules .wm-module :is(input:not([type=checkbox]):not([type=radio]):not([type=file]),select){min-height:40px}
.yw-work-modules .wm-module textarea{min-height:88px;line-height:1.65}
