/* DCMI OS V78 — compatible with original orange/cream V75 interface. */
#identityFields textarea#fld_description[required]{border-color:#e5bb88;min-height:106px}
#identityFields textarea#fld_description.field-error{border:2px solid #d94855!important;background:#fff5f6!important}
#identityFields .dcmi-date-anchor input[type="date"]{display:block;width:100%;min-height:45px;cursor:pointer;background:#fff;color:#40362d;padding:11px 13px}
#identityFields .dcmi-date-anchor input[type="date"]::-webkit-calendar-picker-indicator{cursor:pointer;opacity:.78}
#identityFields .dcmi-date-anchor input[type="hidden"]{display:none!important}
.dcmi-mon-error{background:#fff1ef;color:#9c2d30;border:1px solid #e4bbb3;padding:12px 16px;border-radius:10px;margin-bottom:14px}
.dcmi-monitor-v78{min-width:900px}.dcmi-monitor-v78 td{vertical-align:top;white-space:normal}.dcmi-monitor-v78 .btn{font-size:11px;padding:8px 10px;margin:1px 3px 3px 0}
.dcmi-mon-status{border-radius:8px;display:inline-block;font-weight:750;font-size:11px;padding:5px 9px;white-space:nowrap;background:#f6f3ed;color:#756b60;border:1px solid #e6ded2}
.dcmi-mon-assigned{background:#edf4ff;color:#2865ab;border-color:#c5dbf7}
.dcmi-mon-on_review{background:#fff4dc;color:#a46800;border-color:#e9d29c}
.dcmi-mon-revision{background:#fff0dd;color:#a85d09;border-color:#ecc99c}
.dcmi-mon-done{background:#eaf8ef;color:#147747;border-color:#bde4cb}
.dcmi-mon-desc{font-size:11px;color:#77685b;line-height:1.5;margin-top:5px;max-width:250px;white-space:pre-wrap;overflow-wrap:anywhere}
.dcmi-mon-link{color:#b66b12;font-size:12px;font-weight:750;text-decoration:underline;text-underline-offset:3px}
.dcmi-mon-backdrop{position:fixed;inset:0;background:#1d211ca3;z-index:100100;display:flex;align-items:center;justify-content:center;padding:18px;overflow:auto}
.dcmi-mon-dialog{background:#fff;width:min(620px,100%);padding:26px;border:1px solid #eadac8;border-radius:19px;box-shadow:0 24px 66px #1e130433;max-height:90vh;overflow:auto}
.dcmi-mon-modalhead{display:flex;align-items:center;justify-content:space-between;gap:15px;margin-bottom:14px}
.dcmi-mon-modalhead h3{margin:0;font-size:20px;color:#392d22}
.dcmi-mon-dialog label{font-size:13px;font-weight:700;margin:13px 0 8px;display:block}
.dcmi-mon-dialog select,.dcmi-mon-dialog input,.dcmi-mon-dialog textarea{width:100%;padding:12px 13px;border:1px solid #e6dccf;border-radius:10px;font:inherit;background:#fff;color:#352e26}
.dcmi-mon-dialog textarea{resize:vertical;min-height:92px}
.dcmi-mon-actions{display:flex;justify-content:flex-end;flex-wrap:wrap;gap:9px;margin-top:22px}
.dcmi-mon-warning{background:#fff4e1;border:1px solid #f1d6a8;padding:12px;color:#915e17;border-radius:9px}
.dcmi-mon-crewtbl{min-width:710px}.dcmi-mon-crewtbl th,.dcmi-mon-crewtbl td{white-space:normal;vertical-align:middle}.dcmi-mon-crewtbl .small{font-size:11px;display:block;margin-top:5px}

/* V80 multi-Crew management */
.dcmi-mon-sectionhead{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;margin:16px 0 8px}
.dcmi-mon-sectionhead h3{margin:0}
.dcmi-mon-team{display:flex;gap:5px;flex-wrap:wrap;margin-bottom:8px}
.dcmi-mon-crewchip{background:#fff1e2;border:1px solid #f0d9b7;color:#965613;border-radius:18px;padding:5px 9px;font-weight:700;font-size:11px;white-space:nowrap}
.dcmi-mon-choice-list{max-height:260px;overflow-y:auto;display:grid;gap:6px;padding:8px;border:1px solid #eee2d3;border-radius:12px}
.dcmi-mon-dialog label.dcmi-mon-choice{display:flex;align-items:center;gap:11px;margin:0;padding:9px 8px;font-weight:650;font-size:13px;border-radius:8px;cursor:pointer}
.dcmi-mon-choice:hover{background:#fff8ed}
.dcmi-mon-dialog .dcmi-mon-choice input[type=checkbox]{width:18px;height:18px;flex:none;min-height:0;accent-color:#dd8820}
.dcmi-mon-choice small{margin-left:auto;color:#a58b6d;font-weight:500;font-size:11px}
.dcmi-mon-choice:has(input:disabled){opacity:.63;cursor:default}

/* V81: one independent task row per crew. */
.dcmi-monitor-v78 td{vertical-align:middle;max-width:300px}
.dcmi-monitor-v78 td:nth-child(1){min-width:160px}
.dcmi-monitor-v78 td:nth-child(3){min-width:125px}
.dcmi-mon-edit{background:transparent;border:none;color:#a66417;text-decoration:underline;text-underline-offset:2px;cursor:pointer;font-size:11px;margin:7px 0 0;display:block;padding:0}
.dcmi-mon-edit:hover{color:#77420a}
.dcmi-monitor-v78 .dcmi-mon-crewchip{font-size:12px}
.dcmi-mon-dialog input[type=number]{appearance:auto}
@media(max-width:800px){.dcmi-monitor-v78{min-width:960px}.dcmi-mon-dialog{padding:19px}.monitor-header{gap:12px}}


/* V82: cancel individual Crew assignment, not a permanent database delete. */
.dcmi-mon-cancel{display:block;border:0;background:transparent;color:#b84147;text-decoration:underline;text-underline-offset:2px;cursor:pointer;font-size:11px;padding:4px 0 0;text-align:left}
.dcmi-mon-cancel:hover{color:#881d27}
.dcmi-monitor-v78 .dcmi-mon-cancel-confirm{background:#b53d43!important;border-color:#b53d43!important;color:#fff!important}
.dcmi-mon-cancel-confirm{background:#b53d43!important;border:1px solid #b53d43!important;color:#fff!important;font-weight:750}
.dcmi-mon-cancel-confirm:hover{background:#90292d!important}
.dcmi-mon-cancel-confirm:disabled{opacity:.55;cursor:wait}

/* V111: independent Crew brief, no UI editing of financial Qty. */
.dcmi-v111-brief{white-space:pre-wrap;overflow-wrap:anywhere;max-width:360px}
.dcmi-v111-keyval{border-bottom:1px solid #ede6dd;padding:9px 0}
.dcmi-v111-keyval strong{display:block;color:#897564;font-size:12px;margin-bottom:4px}
.dcmi-v111-keyval span{white-space:pre-wrap;overflow-wrap:anywhere}
.dcmi-mon-dialog input[readonly]{background:#f5f2eb;color:#736a61}

/* V112: PM + Staff can manage primary project link; Crew task detail follows PM's visual hierarchy. */
.dcmi-v112-link-cell{display:flex;flex-direction:column;align-items:flex-start;gap:5px}
.dcmi-v112-link-edit{font-size:11px!important;padding:5px 9px!important;min-height:0!important}
.dcmi-v112-info{background:#fff5e7;border:1px solid #f1dcc2;color:#88591b;border-radius:9px;padding:10px 12px}
.dcmi-v112-status-label{font-size:11px;color:#935d15;font-weight:800;background:#fff1dc;padding:4px 8px;border-radius:8px;margin-left:8px}
.dcmi-v112-task-hero{display:flex;justify-content:space-between;gap:12px;align-items:flex-start;border-bottom:1px solid #eee4d8;padding-bottom:16px;margin-bottom:16px}
.dcmi-v112-eyebrow{font-size:10px;font-weight:800;letter-spacing:.08em;color:#a47130}
.dcmi-v112-task-hero h3{font-size:21px;margin:5px 0 4px;color:#35291f}.dcmi-v112-task-hero p{font-size:12px;color:#897a6b;margin:0}
.dcmi-v112-task-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-bottom:13px}
.dcmi-v112-task-field{border:1px solid #ede2d5;border-radius:12px;padding:13px;background:#fffdfa}
.dcmi-v112-task-field>span,.dcmi-v112-task-result span,.dcmi-v112-task-projectlink>span:first-child{display:block;color:#947d65;font-size:11px;font-weight:800;margin-bottom:6px}
.dcmi-v112-task-field strong{display:block;font-size:13px;color:#403127;white-space:pre-wrap;overflow-wrap:anywhere}
.dcmi-v112-task-track{height:6px;border-radius:9px;margin-top:10px;background:#efe8df;overflow:hidden}.dcmi-v112-task-track i{display:block;height:100%;background:#d99339;border-radius:9px}
.dcmi-v112-task-brief{padding:16px;border:1px solid #f0d8b4;background:#fff8ed;border-radius:13px;margin-bottom:15px}
.dcmi-v112-task-brief p{margin:8px 0 0;white-space:pre-wrap;overflow-wrap:anywhere;font-size:13px;line-height:1.65;color:#483728}
.dcmi-v112-task-projectlink{display:flex;align-items:center;flex-wrap:wrap;gap:8px;border-bottom:1px solid #eee5d9;padding:10px 0 15px;font-size:12px}
.dcmi-v112-task-projectlink>span:first-child{margin:0 4px 0 0}.dcmi-v112-task-projectlink a{color:#a56618;font-weight:750}
.dcmi-v112-result-form label{margin-top:15px}.dcmi-v112-task-result{display:grid;gap:12px;margin-top:15px}.dcmi-v112-task-result>div{border-bottom:1px solid #f1e7db;padding:9px 0}.dcmi-v112-task-result p{white-space:pre-wrap;overflow-wrap:anywhere;margin:0;font-size:13px}
@media(max-width:520px){.dcmi-v112-task-grid{grid-template-columns:1fr}.dcmi-v112-task-hero{flex-direction:column}}

/* V113: Crew invitation, handover & audit history */
.dcmi-v113-task-actions{display:flex;gap:8px;flex-wrap:wrap;margin:8px 0}
.dcmi-v113-task-actions button{white-space:nowrap}
.dcmi-v113-request{display:flex;justify-content:space-between;align-items:center;gap:14px;background:#fcf8f1;border:1px solid #eadcc6;border-radius:12px;padding:14px;margin:12px 0;flex-wrap:wrap}
.dcmi-v113-request strong{display:block;font-weight:700}
.dcmi-v113-handover-inbox{border:1px solid #eddfc9;border-radius:14px;padding:16px;margin-bottom:16px;background:white}
.dcmi-v113-handover-inbox h3{margin:0 0 10px}
.dcmi-v113-handover-btn{margin:12px 0}
.dcmi-v113-history-mark{display:inline-block;margin-left:8px;font-size:11px;color:#86602c;border-radius:7px;background:#f6eedf;padding:3px 7px}
.dcmi-v113-performance{margin-top:24px;border-top:1px solid #eee5d9;padding-top:18px}
.dcmi-v113-performance h3{margin:0 0 6px}
@media(max-width:760px){.dcmi-v113-request{display:block}.dcmi-v113-task-actions button{flex:1}}

/* V117.3.19: Inline project description and compact Crew names. */
.dcmi-project-description{margin:12px 0 18px;padding:13px 16px;border:1px solid #e8dfd0;border-radius:12px;background:#fffaf3;overflow-wrap:anywhere}
.dcmi-project-description strong{display:block;font-size:13px;margin-bottom:5px;color:#765325}
.dcmi-project-description p{margin:0;white-space:pre-wrap;line-height:1.6;color:#474747}
.dcmi-project-progress-detail{display:flex;justify-content:space-between;gap:12px;align-items:center;margin-top:14px;padding:12px;border-radius:10px;background:#f6f4ef}
.dcmi-v119-crew-chip{display:inline-block;background:#fff4db;border:1px solid #eed9ae;border-radius:99px;font-size:12px;padding:3px 8px;margin:2px 3px 2px 0;white-space:nowrap}

/* V117.3.27 — Staff/Freelance assignment category filters beside the name picker. */
.dcmi-mon-dialog .dcmi-v117327-assign-row{display:grid;grid-template-columns:minmax(0,1.48fr) minmax(205px,1fr);gap:12px;align-items:stretch}
.dcmi-v117327-assign-select{min-width:0;display:flex}
.dcmi-mon-dialog .dcmi-v117327-assign-select select{width:100%;min-width:0;min-height:48px}
.dcmi-mon-dialog .dcmi-v117327-assign-select select:disabled{background:#f7f4ef;color:#8c8176;cursor:not-allowed}
.dcmi-mon-dialog .dcmi-v117327-assign-filters{display:flex;min-width:0;align-items:center;justify-content:space-evenly;gap:6px;margin:0;padding:5px 8px;border:1px solid #e6dccf;border-radius:10px;background:#fffaf3}
.dcmi-mon-dialog .dcmi-v117327-filter{display:inline-flex;align-items:center;justify-content:center;gap:6px;white-space:nowrap;margin:0;padding:6px 2px;font-size:12px;line-height:1.3;cursor:pointer}
.dcmi-mon-dialog .dcmi-v117327-filter input[type=checkbox]{width:16px;height:16px;min-width:16px;min-height:16px;margin:0;padding:0;accent-color:#d98a2a;cursor:pointer}
.dcmi-mon-dialog .dcmi-v117327-filter-help{margin:7px 0 0;color:#887769}
@media(max-width:560px){.dcmi-mon-dialog .dcmi-v117327-assign-row{grid-template-columns:1fr;gap:8px}.dcmi-mon-dialog .dcmi-v117327-assign-filters{justify-content:flex-start;gap:20px;padding:8px 12px}}

/* V117.3.50 — historical Staff task detail only */
.dcmi-v112-task-detail .dcmi-mon-handed_over{background:#f1e8fa;color:#694194;border-color:#ddc8ef}
.dcmi-v112-task-detail .dcmi-v150-handover{margin:16px 0;padding:14px 16px;border:1px solid #e1d0f0;border-radius:12px;background:#f7f1fc;color:#674489;overflow-wrap:anywhere}
.dcmi-v150-handover>strong{font-size:14px}.dcmi-v150-handover dl{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 16px;margin:12px 0}
.dcmi-v150-handover dt,.dcmi-v150-handover-reason span{font-size:11px;font-weight:700;color:#826997}.dcmi-v150-handover dd{margin:4px 0 0;font-size:13px;font-weight:700}
.dcmi-v150-handover-reason p{white-space:pre-wrap;margin:5px 0 0;font-size:13px}.dcmi-v150-handover-note{font-size:11px;margin:12px 0 0;color:#826997}
@media(max-width:460px){.dcmi-v150-handover dl{grid-template-columns:1fr}}
