/* HAVAL LAWYER TASK EXPERIENCE — scoped, responsive and accessible.
 * Native <dialog> escapes ancestor stacking contexts, preventing a blurred
 * scrim from painting above the expanded lane. */
.hv-task-focus-dialog{
 position:fixed;inset:auto;margin:auto;box-sizing:border-box;
 width:min(1040px,calc(100vw - 42px));height:min(90dvh,880px);
 max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px);
 padding:0;border:1px solid #dfe6df;border-radius:19px;
 overflow:hidden;background:#fcfcfa;color:#18382e;
 box-shadow:0 30px 105px rgba(7,20,18,.27);
 direction:rtl;
}
.hv-task-focus-dialog:not([open]){display:none}
.hv-task-focus-dialog[open]{display:flex;flex-direction:column;animation:hvTaskFocusEnter 210ms ease-out both}
.hv-task-focus-dialog::backdrop{background:rgba(8,25,22,.34);-webkit-backdrop-filter:blur(1px);backdrop-filter:blur(1px)}
@keyframes hvTaskFocusEnter{from{opacity:.5;transform:translateY(9px) scale(.992)}to{opacity:1;transform:none}}
.hv-task-focus-header{
 display:flex;justify-content:space-between;align-items:center;gap:20px;flex-shrink:0;
 padding:17px 22px;background:linear-gradient(115deg,#f0f7f2,#fffdf7);
 border-bottom:1px solid #dce5de;
}
.hv-task-focus-heading{min-width:0}
.hv-task-focus-eyebrow{font:700 10px Inter,Arial,sans-serif;letter-spacing:1.2px;color:#9d7b36}
.hv-task-focus-heading h2{font-size:19px;line-height:1.6;margin:4px 0;color:#123d30}
.hv-task-focus-heading p{font-size:12px;line-height:1.8;color:#67786c;margin:0}
.hv-task-focus-close{display:inline-flex;align-items:center;gap:8px;justify-content:center;
 border:1px solid #d0ddd2;background:#fff;color:#174333;border-radius:11px;
 padding:9px 13px;font-size:12px;font-weight:700;cursor:pointer;min-height:42px;flex-shrink:0}
.hv-task-focus-close span:first-child{font:400 23px/1 Arial,sans-serif}
.hv-task-focus-close:hover{background:#eaf4ed}
.hv-task-focus-content{min-height:0;flex:1;overflow:hidden;padding:14px;background:#f6f8f5}
.hv-task-focus-dialog #taskBoard.hv-task-board-in-dialog{
 display:block!important;height:100%;max-height:none!important;
 min-width:0!important;overflow:hidden;
}
.hv-task-focus-dialog #taskBoard>.task-lane{display:none!important}
.hv-task-focus-dialog #taskBoard>.task-lane.hv-lane-maximized{
 display:flex!important;position:static!important;inset:auto!important;
 flex-direction:column;height:100%;width:100%;min-height:0;max-width:none!important;
 overflow:hidden;margin:0!important;padding:0!important;
 border:1px solid #dae4dc;border-radius:13px;background:#fff;
 box-shadow:0 10px 28px rgba(15,38,29,.04)
}
.hv-task-focus-dialog .task-lane-head{position:sticky;top:0;z-index:3;flex-shrink:0;
 display:flex;align-items:center;justify-content:space-between;background:#fff;
 padding:13px 18px;border-bottom:1px solid #e2e9e3}
.hv-task-focus-dialog .task-lane-title{font-size:15px;font-weight:800;color:#164635}
.hv-task-focus-dialog .task-lane-body{
 display:grid!important;align-content:start;grid-template-columns:repeat(2,minmax(0,1fr));
 gap:12px;flex:1;min-height:0;max-height:none!important;overflow:auto!important;
 scrollbar-gutter:stable;padding:16px!important;overscroll-behavior:contain
}
.hv-task-focus-dialog .task-lane-body>.task-card{margin:0!important;max-width:none!important;width:auto!important;
 min-width:0;align-self:start;border:1px solid #e0e8e0;border-radius:12px;
 background:#fff;box-shadow:0 2px 14px rgba(20,50,32,.035);padding:13px}
.hv-task-focus-dialog .task-card h4{overflow-wrap:anywhere;font-size:13px;line-height:1.7}
.hv-task-focus-dialog .task-card :is(p,summary,.hv-legal-note){overflow-wrap:anywhere}
.hv-task-focus-dialog .hv-recurring-task-card{border-inline-start:3px solid #16734f!important}
.hv-task-focus-dialog .task-lane-body>.hv-task-year-divider{grid-column:1/-1;margin:8px 0 0}
.hv-task-focus-dialog .task-lane-body>.task-empty{grid-column:1/-1}
.hv-task-focus-dialog .hv-legal-expand>summary,.hv-task-focus-dialog .hv-unified-task-details summary{
 display:flex;justify-content:space-between;align-items:center;gap:8px;padding:8px 2px;
 cursor:pointer;color:#126746;font-size:12px;font-weight:700;list-style:none
}
.hv-task-focus-dialog .hv-legal-expand,.hv-task-focus-dialog .hv-unified-task-details{
 border-top:1px solid #e5ebe6;margin-top:9px}
.hv-task-focus-dialog :is(button,summary,select,input):focus-visible{outline:3px solid #b99543;outline-offset:2px}
/* Task detail panel uses the same existing business APIs and controls. */
body>#taskDetailModal{
 position:fixed;inset:0;z-index:11000;align-items:stretch!important;justify-content:flex-end!important;
 padding:0!important;background:rgba(8,24,21,.33)!important;
 -webkit-backdrop-filter:blur(1px)!important;backdrop-filter:blur(1px)!important;
}
body>#taskDetailModal.open{display:flex!important}
body>#taskDetailModal .modalbox.hv-task-details-drawer{
 box-sizing:border-box;position:relative;flex:0 1 860px;
 width:min(860px,94vw)!important;max-width:none!important;height:100dvh!important;
 max-height:100dvh!important;margin:0!important;overflow:hidden!important;
 display:flex;flex-direction:column;border-radius:0 18px 18px 0!important;
 box-shadow:0 28px 90px rgba(4,24,19,.28)!important;background:#fbfcfa!important;
}
body>#taskDetailModal .hv-task-detail-head{
 flex-shrink:0;position:relative;z-index:2;display:flex!important;flex-wrap:wrap;
 gap:10px 16px;align-items:center;justify-content:space-between;padding:19px 22px!important;
 border-bottom:1px solid #dce7df;background:#f3f8f4!important
}
body>#taskDetailModal .hv-task-detail-head h3{font-size:19px;line-height:1.65;overflow-wrap:anywhere}
body>#taskDetailModal .hv-task-detail-kicker{display:block;font:700 10px/1.6 Inter,Arial,sans-serif;
 letter-spacing:1px;color:#9c7a36}
body>#taskDetailModal .hv-task-detail-head-actions{display:flex;gap:7px;flex-wrap:wrap;align-items:center}
body>#taskDetailModal .modalbody{flex:1;min-height:0;overflow-y:auto!important;overscroll-behavior:contain;
 padding:19px 20px!important;background:#fbfcfa!important}
body>#taskDetailModal .task-detail-grid{display:grid;grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);
 gap:16px;align-items:start}
body>#taskDetailModal .task-detail-panel{
 min-width:0;overflow:hidden;box-sizing:border-box;border:1px solid #dfe8e1;
 background:#fff!important;border-radius:15px;padding:17px}
body>#taskDetailModal .task-detail-panel h4{font-size:14px;color:#17523a;margin:0 0 14px}
body>#taskDetailModal .task-detail-meta{display:flex;flex-wrap:wrap;gap:7px;margin-bottom:15px}
body>#taskDetailModal :is(.task-comment,.task-history-item){overflow-wrap:anywhere}
body>#taskDetailModal :is(textarea,input,select){max-width:100%;box-sizing:border-box}
body>#taskDetailModal .task-comments,body>#taskDetailModal .task-history{max-height:none;overflow:visible}
body>#taskDetailModal .task-photos{grid-template-columns:repeat(3,minmax(0,1fr))}
body>#taskDetailModal .task-upload-row{flex-wrap:wrap}
body>#taskDetailModal .hv-task-detail-footer{flex-shrink:0;display:flex;justify-content:flex-end;align-items:center;
 gap:10px;flex-wrap:wrap;border-top:1px solid #dce7df;background:#fff!important;
 padding:13px 19px max(13px,env(safe-area-inset-bottom))!important}
body>#taskDetailModal .hv-task-detail-footer .btn{min-height:40px}
body>#taskDetailModal .hv-task-detail-loading{margin:15px;padding:16px;border:1px solid #e3eae4;
 border-radius:12px;background:#f4f7f3;color:#4b6458;font-size:13px}
body>#taskDetailModal[aria-busy="true"] .task-detail-grid{opacity:.3;pointer-events:none}
/* Preview must remain above the task drawer when opening private task attachments. */
body>#filePreviewModal.open{z-index:11100!important;display:flex!important}
body>#filePreviewModal .modalbox.previewbox{max-width:min(94vw,1050px)!important;
 max-height:min(92dvh,930px)!important;overflow:hidden}
body>#filePreviewModal .previewbody{min-height:0;overflow:auto}
body.hv-task-detail-lock{overflow:hidden}
body>#taskDetailModal :is(button,textarea,input,select):focus-visible{outline:3px solid #bc9748;outline-offset:2px}
#page-tasks .task-card h4{overflow-wrap:anywhere}
@media(max-width:780px){
 .hv-task-focus-dialog{width:calc(100vw - 18px);height:calc(100dvh - 18px);
  max-width:none;max-height:none;border-radius:13px}
 .hv-task-focus-dialog .task-lane-body{grid-template-columns:1fr!important;padding:10px!important}
 .hv-task-focus-header{padding:12px 14px}
 .hv-task-focus-heading h2{font-size:16px}
 .hv-task-focus-heading p{font-size:11px}
 body>#taskDetailModal .modalbox.hv-task-details-drawer{
  flex:1;width:100vw!important;max-width:100vw!important;height:100dvh!important;max-height:100dvh!important;
  border-radius:0!important}
 body>#taskDetailModal .task-detail-grid{grid-template-columns:1fr}
 body>#taskDetailModal .hv-task-detail-head{padding:13px 14px!important}
 body>#taskDetailModal .modalbody{padding:12px!important}
 body>#taskDetailModal .task-detail-panel{padding:13px}
 body>#taskDetailModal .task-photos{grid-template-columns:repeat(3,minmax(0,1fr))}
 body>#taskDetailModal .hv-task-detail-footer{padding:10px max(12px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left))!important}
}
@media(max-width:450px){
 .hv-task-focus-close{font-size:0;width:43px;padding:0}.hv-task-focus-close span:first-child{font-size:23px}
 body>#taskDetailModal .hv-task-detail-head h3{font-size:16px}
 body>#taskDetailModal .hv-task-detail-head-actions>.btn{min-height:34px;padding:6px 8px;font-size:11px}
 body>#taskDetailModal .hv-task-detail-footer .btn{flex:1}
 body>#taskDetailModal .task-photos{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(prefers-reduced-motion:reduce){
 .hv-task-focus-dialog[open],body>#taskDetailModal.open .modalbox{animation:none!important;transition:none!important}
}

/* Task lane focus 2.0: restore the card styles lost when #taskBoard is moved
   outside #page-tasks into the native dialog, then offer a calmer legal workflow. */
.hv-task-focus-dialog{
 font-family:"Noto Sans Arabic","Noto Kufi Arabic",Inter,system-ui,sans-serif;
 font-size:13px;line-height:1.7;color:#173c31;
 width:min(1120px,calc(100vw - 52px));
 height:min(90dvh,880px);border-radius:20px;
}
.hv-task-focus-dialog .hv-task-focus-header{
 background:#fff;min-height:100px;padding:19px 26px;
 border-bottom:1px solid #e0e8e1;
}
.hv-task-focus-dialog .hv-task-focus-title-row{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.hv-task-focus-dialog .hv-task-focus-title-row h2{
 margin:3px 0;color:#173d30;font-size:21px;font-weight:800;
}
.hv-task-focus-dialog .hv-task-focus-count{
 display:inline-flex;align-items:center;justify-content:center;
 color:#276b4f;background:#eaf6ee;border:1px solid #d7ebdf;
 padding:3px 11px;border-radius:100px;font-size:12px;font-weight:750;
 white-space:nowrap;
}
.hv-task-focus-dialog .hv-task-focus-count:empty{display:none}
.hv-task-focus-dialog .hv-task-focus-close{
 min-width:86px;min-height:42px;box-shadow:none;border-color:#dae6dd;font-family:inherit;
 font-size:12px;transition:background .18s ease,border-color .18s ease
}
.hv-task-focus-dialog .hv-task-focus-content{padding:18px;background:#f6f8f6}
.hv-task-focus-dialog .task-lane.hv-lane-maximized{
 border:0!important;background:transparent!important;box-shadow:none!important;
}
.hv-task-focus-dialog .task-lane.hv-lane-maximized>.task-lane-head{
 display:none!important; /* Don't repeat the same title, count and maximize control. */
}
.hv-task-focus-dialog .task-lane-body{
 padding:4px 5px 20px!important;gap:16px!important;min-width:0;
 scrollbar-gutter:stable;align-items:start;
}
.hv-task-focus-dialog .task-lane-body>.task-card{
 box-sizing:border-box!important;min-width:0!important;
 padding:19px 20px!important;border:1px solid #dfe8e0!important;
 border-inline-start:3px solid #237552!important;
 border-radius:15px!important;background:#fff!important;color:#183e30!important;
 box-shadow:0 4px 16px rgba(17,48,35,.045)!important;
 cursor:default;opacity:1;transform:none!important;
 font-family:inherit;font-size:13px;line-height:1.7;
}
.hv-task-focus-dialog .task-lane-body>.task-card:hover{
 border-color:#c4ddce!important;box-shadow:0 6px 24px rgba(17,48,35,.065)!important;
}
.hv-task-focus-dialog .task-card .hv-legal-task-head{
 display:flex;justify-content:space-between;align-items:flex-start;
 gap:12px;flex-wrap:wrap;line-height:1.6;font-size:13px;color:#163e30;
}
.hv-task-focus-dialog .task-card .hv-legal-task-head strong{
 min-width:0;flex:1;overflow-wrap:anywhere;font-weight:800;
 font-size:14px;line-height:1.65;
}
.hv-task-focus-dialog .task-card .hv-legal-task-head>span{
 display:inline-flex;align-items:center;background:#f2f5f1;color:#65776c;
 border:1px solid #e2e9e1;border-radius:7px;padding:3px 9px;
 white-space:nowrap;font-size:11px;line-height:1.7;flex:none
}
.hv-task-focus-dialog .task-card .hv-legal-task-meta{
 display:flex;align-items:center;justify-content:space-between;
 flex-wrap:wrap;gap:8px;margin:13px 0 0;padding:0;
}
.hv-task-focus-dialog .hv-legal-task-meta small{
 color:#576c61;font-size:11px;line-height:1.6;overflow-wrap:anywhere;
}
.hv-task-focus-dialog .hv-legal-status{
 display:inline-flex;align-items:center;gap:5px;padding:4px 10px;
 border-radius:99px;background:#edf1ef;color:#4e6258;
 font-size:11px;font-weight:750;white-space:nowrap;line-height:1.65;
}
.hv-task-focus-dialog .hv-legal-status::before{
 content:"";width:6px;height:6px;flex:none;background:currentColor;border-radius:50%;
}
.hv-task-focus-dialog .hv-legal-status.status-completed{
 color:#176744;background:#e6f5e9;
}
.hv-task-focus-dialog .hv-legal-status.status-overdue{
 color:#b23b40;background:#fce9e8;
}
.hv-task-focus-dialog .hv-legal-status.status-soon{
 color:#916115;background:#fff2db;
}
.hv-task-focus-dialog .hv-legal-status.status-awaiting_evidence,
.hv-task-focus-dialog .hv-legal-status.status-awaiting_review{
 color:#926b27;background:#fbf2df;
}
.hv-task-focus-dialog .hv-legal-expand{
 border-top:1px solid #e8eee8;margin-top:15px;padding-top:4px;
 font-size:12px;color:#23483b;
}
.hv-task-focus-dialog .hv-legal-expand>summary{
 list-style:none;display:flex;align-items:center;justify-content:space-between;
 gap:12px;color:#216949;font-size:12px;font-weight:750;line-height:1.7;
 padding:10px 2px;min-height:38px;border-radius:8px;cursor:pointer;
}
.hv-task-focus-dialog .hv-legal-expand>summary::-webkit-details-marker{display:none}
.hv-task-focus-dialog .hv-legal-expand>summary>span{display:flex;align-items:center;gap:8px}
.hv-task-focus-dialog .hv-legal-expand>summary svg{width:16px;height:16px;flex:none}
.hv-task-focus-dialog .hv-legal-expand>summary>svg:last-child{transition:transform .18s}
.hv-task-focus-dialog .hv-legal-expand[open]>summary>svg:last-child{transform:rotate(180deg)}
.hv-task-focus-dialog .hv-legal-expand>summary:hover{background:#f5faf5}
.hv-task-focus-dialog .hv-legal-expand[open]{padding-bottom:3px}
.hv-task-focus-dialog .hv-legal-range{
 display:flex;align-items:center;gap:6px;
 border-radius:9px;background:#f7faf7;color:#546d5f;border:1px solid #e4ebe5;
 margin:9px 0 12px;padding:10px 11px;font-size:11px;line-height:1.8;
 overflow-wrap:anywhere;
}
.hv-task-focus-dialog .hv-legal-files{
 display:flex;flex-wrap:wrap;align-items:center;gap:8px;
 margin:9px 0 13px;min-width:0;
}
.hv-task-focus-dialog .hv-legal-files:empty::before{
 content:"لا توجد مرفقات مضافة لهذه الفترة";display:block;width:100%;
 color:#839188;font-size:11px;line-height:1.8;
}
.hv-task-focus-dialog .hv-legal-file{
 box-sizing:border-box;display:inline-flex;align-items:center;gap:4px;
 border:1px solid #dfe8e0;border-radius:10px;padding:4px;
 background:#f8faf8;min-width:0;
}
.hv-task-focus-dialog .hv-legal-file button{
 display:inline-flex;align-items:center;justify-content:center;
 width:34px;min-width:34px;height:34px;min-height:34px;
 border:0;border-radius:7px;padding:0;background:transparent;
 color:#216649;cursor:pointer;font-family:inherit;
}
.hv-task-focus-dialog .hv-legal-file button:hover{background:#e6f2e9}
.hv-task-focus-dialog .hv-legal-file button.hv-legal-delete{color:#ad4a4b}
.hv-task-focus-dialog .hv-legal-file button.hv-legal-delete:hover{background:#fceaea}
.hv-task-focus-dialog .hv-legal-file svg{width:16px;height:16px;display:block}
.hv-task-focus-dialog .hv-legal-actions{
 display:flex;gap:9px;align-items:stretch;flex-wrap:wrap;
 margin:12px 0 0;min-width:0;
}
.hv-task-focus-dialog .hv-task-action-row{padding-bottom:11px}
.hv-task-focus-dialog .hv-task-action{
 display:inline-flex;justify-content:center;align-items:center;gap:7px;
 border:1px solid #d6e3da;border-radius:9px;padding:9px 13px;
 min-height:40px;min-width:0;background:#fff;color:#205d43;
 cursor:pointer;font-family:inherit;font-size:11px;font-weight:750;
 line-height:1.45;white-space:normal;text-align:center;
 transition:background .16s ease,border-color .16s ease;
}
.hv-task-focus-dialog .hv-task-action svg{width:16px;height:16px;flex:none}
.hv-task-focus-dialog .hv-task-action:hover{background:#edf6ee;border-color:#b6d9c1}
.hv-task-focus-dialog .hv-task-status-actions{
 border-top:1px dashed #dee7df;padding-top:13px;
 display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end;
 gap:9px;
}
.hv-task-focus-dialog .hv-task-status-label{
 display:flex;flex-direction:column;gap:5px;min-width:0;
 font-size:11px;font-weight:700;color:#506b5b;
}
.hv-task-focus-dialog .hv-task-status-label select{
 display:block;box-sizing:border-box;width:100%;min-width:0;max-width:100%;
 border:1px solid #d4e0d7;color:#173e30;background:#fff;border-radius:9px;
 padding:8px 10px;min-height:41px;font-family:inherit;font-size:12px;font-weight:600;line-height:1.5;
 cursor:pointer;
}
.hv-task-focus-dialog .hv-task-action-save{
 background:#176348;color:#fff;border-color:#176348;
 min-height:41px;white-space:nowrap;
}
.hv-task-focus-dialog .hv-task-action-save:hover{background:#12513b;color:#fff}
.hv-task-focus-dialog .hv-legal-note{
 margin:10px 0;border:1px solid #ebddbb;border-radius:10px;
 padding:12px;background:#fffbf2;color:#5b4d36;
 overflow-wrap:anywhere;font-size:11px;
}
.hv-task-focus-dialog .hv-legal-note strong{font-size:11px;display:block}
.hv-task-focus-dialog .hv-legal-note p{
 font-size:11px;color:#6d6148;line-height:1.75;white-space:pre-wrap;
 margin:6px 0 9px;
}
.hv-task-focus-dialog .hv-legal-note button{
 display:inline-flex;align-items:center;gap:7px;border:1px solid #dccb9c;
 background:#fff;color:#786029;border-radius:8px;
 padding:7px 11px;cursor:pointer;font-family:inherit;font-size:11px;font-weight:700;line-height:1.5;
}
.hv-task-focus-dialog .hv-linked-description{
 margin-top:11px;color:#60756a;font-size:11px;line-height:1.8;
 overflow-wrap:anywhere;
}
.hv-task-focus-dialog .task-lane-body>.hv-year-divider,
.hv-task-focus-dialog .task-lane-body>.hv-task-year-divider{
 grid-column:1/-1;display:flex;align-items:center;gap:13px;min-width:0;
 font-size:12px;font-weight:800;color:#567163;
 margin:12px 0 2px;padding:0 4px;
}
.hv-task-focus-dialog .task-lane-body>.hv-year-divider::before,
.hv-task-focus-dialog .task-lane-body>.hv-year-divider::after{
 content:"";height:1px;flex:1;background:#dce6dc;
}
.hv-task-focus-dialog .task-lane-body>.hv-year-divider::before{flex:0 0 14px}
.hv-task-focus-dialog .task-lane-body>.task-empty{grid-column:1/-1;text-align:center;padding:35px;color:#738279}
.hv-task-focus-dialog .task-card :is(.task-card-top,.task-card-actions,.task-card-meta){display:flex;align-items:center;flex-wrap:wrap;gap:9px}
.hv-task-focus-dialog .task-card h4{color:#1b4938;font-size:14px;line-height:1.7;overflow-wrap:anywhere}
.hv-task-focus-dialog .task-card p{font-size:12px;color:#64776a;line-height:1.8;overflow-wrap:anywhere}
.hv-task-focus-dialog .task-card .task-period{
 background:#f0f6ef;color:#25694a;border-radius:7px;padding:4px 8px;
 font-size:11px;font-weight:700;
}
.hv-task-focus-dialog .task-card .task-check{
 width:35px;height:35px;border-radius:50%;border:1px solid #d9e5da;
 background:#fff;color:#24674b;display:grid;place-items:center;cursor:pointer;
}
.hv-task-focus-dialog .task-card .task-mobile-move button{border:1px solid #d9e5da;border-radius:8px;padding:6px}
.hv-task-focus-dialog .task-card .task-drag{cursor:grab;opacity:.5}
.hv-task-focus-dialog :is(button,select,summary):focus-visible{outline:3px solid #b6923a;outline-offset:2px}
@media(max-width:1000px){
 .hv-task-focus-dialog{width:min(760px,calc(100vw - 20px))}
 .hv-task-focus-dialog .task-lane-body{grid-template-columns:1fr!important;max-width:100%}
 .hv-task-focus-dialog .hv-task-focus-header{padding:15px 18px;min-height:0}
}
@media(max-width:780px){
 .hv-task-focus-dialog{width:calc(100vw - 12px);max-width:none;height:calc(100dvh - 12px);
  max-height:none;border-radius:13px}
 .hv-task-focus-dialog .hv-task-focus-content{padding:10px}
 .hv-task-focus-dialog .task-lane-body{padding:4px 2px 24px!important;gap:10px!important}
 .hv-task-focus-dialog .task-lane-body>.task-card{padding:14px!important}
 .hv-task-focus-dialog .hv-task-focus-header{padding:12px 13px;gap:10px}
 .hv-task-focus-dialog .hv-task-focus-title-row h2{font-size:18px}
 .hv-task-focus-dialog .hv-task-focus-close{min-width:45px}
 .hv-task-focus-dialog .hv-legal-actions{gap:7px}
 .hv-task-focus-dialog .hv-task-action-row>.hv-task-action{flex:1}
}
@media(max-width:380px){
 .hv-task-focus-dialog .hv-task-status-actions{grid-template-columns:1fr}
 .hv-task-focus-dialog .hv-task-status-actions>.hv-task-action{width:100%}
 .hv-task-focus-dialog .hv-task-focus-header p{display:none}
}
@media(prefers-reduced-motion:reduce){
 .hv-task-focus-dialog :is(.hv-task-action,.hv-legal-expand>summary svg){transition:none}
}

/* 2026-10-22 — centered master/detail task workflow */
dialog.hv-task-focus-dialog{
 position:fixed!important;inset:0!important;margin:auto!important;
 width:min(1180px,92vw)!important;max-width:calc(100vw - 20px)!important;
 height:min(88dvh,880px)!important;max-height:calc(100dvh - 20px)!important;
 transform:none!important;
}
dialog.hv-task-focus-dialog[open]{
 animation:hvTaskFocusEnter 180ms ease-out both;
}
.hv-task-focus-dialog .task-lane-body{
 grid-template-columns:repeat(2,minmax(0,1fr))!important;
 gap:16px!important;align-items:start!important;align-content:start!important;
}
.hv-task-focus-dialog .task-lane-body>.hv-recurring-task-card{
 display:flex!important;flex-direction:column!important;align-items:stretch!important;
 gap:0;min-height:178px!important;height:auto!important;
 padding:18px 19px!important;
}
.hv-task-focus-dialog .task-lane-body>.hv-recurring-task-card>.hv-legal-expand{
 display:none!important;
}
.hv-task-focus-dialog .task-lane-body>.hv-recurring-task-card>.hv-task-manage-trigger{
 display:flex!important;margin-top:auto;align-items:center;justify-content:center;gap:9px;
 width:100%;min-height:43px;border:1px solid #cbded0;border-radius:10px;
 background:#f1f8f3;color:#176047;cursor:pointer;font-family:inherit;
 font-weight:750;font-size:12px;line-height:1.6;padding:10px 12px;
 transition:background .18s ease,border-color .18s ease;
}
.hv-task-focus-dialog .hv-task-manage-trigger>svg{width:16px;height:16px;flex:none}
.hv-task-focus-dialog .hv-task-manage-trigger>svg:last-child{margin-inline-start:auto;opacity:.65}
.hv-task-focus-dialog .task-lane-body>.hv-recurring-task-card>.hv-task-manage-trigger:hover{
 background:#e7f2ea;border-color:#a2cbb0;
}
#page-tasks .hv-task-manage-trigger,#portalView .hv-task-manage-trigger{
 display:none!important;
}
/* A centered, native nested dialog; it stays above its already modal parent. */
dialog.hv-recurring-manage-dialog{
 position:fixed!important;inset:0!important;margin:auto!important;
 box-sizing:border-box;width:min(760px,92vw)!important;max-width:calc(100vw - 18px)!important;
 height:auto!important;max-height:min(82dvh,820px)!important;
 border:1px solid #d8e6dc;border-radius:19px;
 padding:0;overflow:hidden;direction:rtl;background:#fafcf9;color:#193e30;
 box-shadow:0 24px 90px rgba(9,27,20,.24);
 font-family:"Noto Sans Arabic","Noto Kufi Arabic",Inter,system-ui,sans-serif;
}
dialog.hv-recurring-manage-dialog:not([open]){display:none!important}
dialog.hv-recurring-manage-dialog[open]{
 display:flex!important;flex-direction:column!important;animation:hvTaskFocusEnter 160ms ease-out both
}
dialog.hv-recurring-manage-dialog::backdrop{
 background:rgba(8,24,20,.36);-webkit-backdrop-filter:blur(1px);backdrop-filter:blur(1px)
}
.hv-rm-header{
 display:flex;justify-content:space-between;align-items:center;gap:18px;flex-shrink:0;
 padding:18px 23px;background:#fff;border-bottom:1px solid #dce8de;
}
.hv-rm-heading{min-width:0}
.hv-rm-heading h2{font-size:19px;line-height:1.65;font-weight:800;color:#173e2f;margin:3px 0 9px}
.hv-rm-eyebrow{font-family:Inter,Arial,sans-serif;color:#a07a36;font-size:9px;font-weight:800;letter-spacing:1px}
.hv-rm-header-meta{display:flex;gap:6px;flex-wrap:wrap}
.hv-rm-header-meta>span{
 padding:4px 9px;background:#f3f7f3;border:1px solid #e0e9e2;
 border-radius:100px;color:#527060;font-weight:650;font-size:11px;
}
.hv-rm-close{
 display:flex;align-items:center;justify-content:center;gap:8px;flex:none;
 min-height:42px;min-width:90px;padding:8px 12px;
 background:#fff;border:1px solid #d7e4db;border-radius:10px;
 color:#1a593d;font-family:inherit;font-size:12px;font-weight:750;cursor:pointer
}
.hv-rm-close:hover{background:#f1f7f2}
.hv-rm-close>svg{width:17px;height:17px}
.hv-rm-body{min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable;
 padding:18px 22px 22px;background:#f8faf7}
.hv-rm-form>summary{display:none!important}
.hv-rm-form{display:grid;gap:13px;min-width:0;margin:0;padding:0;border:0!important;background:none}
.hv-rm-section{
 border:1px solid #dfe9e1;border-radius:13px;background:#fff;
 padding:15px 17px;min-width:0;
}
.hv-rm-section-title{display:flex;align-items:center;gap:8px;margin:0 0 12px;
 padding-bottom:10px;border-bottom:1px solid #eef2ef;
 color:#1c6546;font-weight:800;font-size:13px}
.hv-rm-section-title>svg{width:16px;height:16px;flex:none}
.hv-rm-section .hv-legal-range{margin:0!important}
.hv-rm-section .hv-legal-files{display:flex;flex-wrap:wrap;gap:9px;min-width:0}
.hv-rm-section .hv-legal-file{
 display:flex;align-items:center;gap:6px;max-width:100%;min-width:0;
 border:1px solid #dfe9e0;background:#f8faf8;border-radius:9px;
 padding:5px 7px
}
.hv-rm-section .hv-legal-file-name{
 max-width:min(270px,55vw);min-width:0;overflow:hidden;text-overflow:ellipsis;
 white-space:nowrap;color:#314f3d;font-size:12px;direction:auto;
}
.hv-rm-section .hv-legal-file button{
 width:36px!important;height:36px!important;min-width:36px;
 display:inline-flex;align-items:center;justify-content:center;border:0;border-radius:7px;
 background:transparent;cursor:pointer;color:#196044;padding:0;
}
.hv-rm-section .hv-legal-file button:hover{background:#e5f1e8}
.hv-rm-section .hv-legal-file button.hv-legal-delete{color:#b3474b}
.hv-rm-section .hv-legal-file button.hv-legal-delete:hover{background:#fceaea}
.hv-rm-section .hv-legal-file svg{width:17px;height:17px}
.hv-rm-empty{font-size:12px;color:#708279;line-height:1.8;margin:5px 0}
.hv-rm-section .hv-legal-actions{display:flex;gap:9px;flex-wrap:wrap;margin:0 0 12px}
.hv-rm-section .hv-task-action{
 display:inline-flex;align-items:center;justify-content:center;gap:8px;
 min-height:43px;padding:10px 14px;border:1px solid #d5e4d8;border-radius:10px;
 background:#fff;color:#1e6246;cursor:pointer;font:750 12px/1.5 "Noto Sans Arabic",system-ui,sans-serif;
}
.hv-rm-section .hv-task-action>svg{width:16px;height:16px}
.hv-rm-section .hv-task-action:hover{background:#eff8f0}
.hv-rm-section .hv-task-status-actions{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;align-items:end;
 border-top:1px solid #e4ebe5;padding-top:13px;margin:0}
.hv-rm-section .hv-task-status-label{display:flex;flex-direction:column;gap:7px;
 color:#456653;font-size:11px;font-weight:800;min-width:0}
.hv-rm-section .hv-task-status-label select{display:block;width:100%;min-height:43px;min-width:0;
 box-sizing:border-box;padding:9px 12px;border:1px solid #d7e4da;background:#fff;color:#174733;
 border-radius:9px;font-family:inherit;font-size:12px;font-weight:700}
.hv-rm-section .hv-task-action-save{color:#fff!important;background:#166247!important;border-color:#166247!important}
.hv-rm-section .hv-task-action-save:hover{background:#104e39!important}
.hv-rm-section .hv-legal-note{border:1px solid #e9d7af;background:#fffbf2;border-radius:10px;
 margin:0;padding:11px;color:#655331;white-space:normal;overflow-wrap:anywhere;font-size:12px}
.hv-rm-section .hv-legal-note strong{display:block;margin-bottom:6px}
.hv-rm-section .hv-legal-note p{margin:7px 0;line-height:1.75;white-space:pre-wrap}
.hv-rm-section .hv-legal-note button{border:1px solid #d7c492;border-radius:8px;
 background:#fff;padding:7px 12px;color:#68532b;cursor:pointer;font-family:inherit}
.hv-recurring-manage-dialog :is(button,select):focus-visible{outline:3px solid #b6944e;outline-offset:2px}
/* Standard (non-compliance) task details also center when launched from a focused lane. */
body.hv-task-detail-centered>#taskDetailModal.open{
 display:flex!important;align-items:center!important;justify-content:center!important;
 padding:10px!important;
}
body.hv-task-detail-centered>#taskDetailModal .modalbox.hv-task-details-drawer{
 position:relative!important;width:min(760px,92vw)!important;
 max-width:calc(100vw - 20px)!important;
 height:min(82dvh,820px)!important;max-height:calc(100dvh - 20px)!important;
 border-radius:18px!important;margin:auto!important;
}
@media(max-width:800px){
 dialog.hv-task-focus-dialog{width:calc(100vw - 16px)!important;height:calc(100dvh - 16px)!important;}
 .hv-task-focus-dialog .task-lane-body{grid-template-columns:1fr!important}
 dialog.hv-recurring-manage-dialog{width:calc(100vw - 16px)!important;max-height:calc(100dvh - 16px)!important}
 .hv-rm-header{padding:13px 14px}
 .hv-rm-body{padding:11px}
 .hv-rm-section{padding:13px}
 body.hv-task-detail-centered>#taskDetailModal .modalbox.hv-task-details-drawer{
  width:100vw!important;max-width:100vw!important;height:100dvh!important;max-height:100dvh!important;
  border-radius:0!important}
}
@media(max-width:420px){
 .hv-rm-heading h2{font-size:16px}
 .hv-rm-close{min-width:42px;font-size:0;padding:8px}
 .hv-rm-close>svg{width:19px;height:19px}
 .hv-rm-section .hv-task-status-actions{grid-template-columns:1fr}
 .hv-rm-section .hv-task-status-actions>.hv-task-action{width:100%}
}
@media(prefers-reduced-motion:reduce){
 dialog.hv-recurring-manage-dialog[open],dialog.hv-task-focus-dialog[open]{animation:none!important}
}
