/* Shared event history. New names isolate the component from legacy timeline rules. */
html body .ff-event-list{display:flex!important;flex-direction:column!important;gap:0!important;list-style:none!important;padding:0!important;margin:14px 0 0!important;width:100%!important;min-width:0!important;max-width:100%!important;height:auto!important;max-height:none!important;overflow:visible!important;box-sizing:border-box!important;}
html body .ff-event-list .ff-event-row{position:relative!important;display:block!important;box-sizing:border-box!important;min-width:0!important;width:100%!important;height:auto!important;flex:0 0 auto!important;margin:0!important;padding:0 4px 23px 26px!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;overflow-wrap:anywhere!important;white-space:normal!important;}
html body .ff-event-list .ff-event-row::before{content:"";position:absolute;left:5px;top:9px;width:7px;height:7px;border-radius:50%;background:#ff5e14;box-shadow:0 0 0 4px #fff0e9;z-index:1;}
html body .ff-event-list .ff-event-row:not(:last-child)::after{content:"";position:absolute;left:8px;top:20px;bottom:0;width:1px;background:#e7e9ee;}
html body .ff-event-list .ff-event-row:last-child{padding-bottom:0!important;}

html body .ff-event-list .ff-event-heading{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;align-items:start!important;gap:8px 14px!important;min-width:0!important;}
html body .ff-event-list .ff-event-text{flex:1 1 240px!important;min-width:0!important;color:#24244d!important;font:500 14px/1.65 Arial,sans-serif!important;letter-spacing:normal!important;white-space:pre-wrap!important;overflow-wrap:anywhere!important;}
html body .ff-event-list .ff-event-category{position:static!important;justify-self:end!important;align-self:start!important;display:inline-block!important;flex:0 0 auto!important;max-width:100%!important;padding:4px 8px!important;border:1px solid #e5e8ee!important;border-radius:6px!important;color:#686e80!important;background:#fff!important;font:700 10px/1.4 Arial,sans-serif!important;letter-spacing:.04em!important;white-space:normal!important;}
html body .ff-event-list .ff-event-meta{display:flex!important;flex-wrap:wrap!important;gap:5px 14px!important;margin-top:5px!important;color:#70798b!important;font:400 12px/1.6 Arial,sans-serif!important;min-width:0!important;}
html body .ff-event-list .ff-event-meta time{flex:0 1 auto!important;font:inherit!important;color:inherit!important;}
html body .ff-event-list .ff-event-author{flex:1 1 180px!important;min-width:0!important;font:inherit!important;color:inherit!important;overflow-wrap:anywhere!important;}
html body .ff-event-empty{padding:16px!important;border:1px dashed #dce1e9!important;border-radius:12px!important;color:#70798b!important;font-size:13px!important;}
/* History sections occupy a full grid row and grow with their entries. */
html body :is(.section-box,.contractor-detail-block,.user-detail-row,.v98-manager-history,.v101-contractor-history-block,#ticketEditUnifiedHistory):has(> .ff-event-list){position:relative!important;inset:auto!important;transform:none!important;float:none!important;clear:both!important;grid-column:1 / -1!important;grid-row:auto!important;align-self:start!important;min-width:0!important;width:100%!important;height:auto!important;max-height:none!important;box-sizing:border-box!important;overflow:visible!important;}
html body #contractorTicketSheet #contractorTicketBody{display:flex!important;flex-direction:column!important;gap:18px!important;min-width:0!important;}
html body #contractorTicketSheet #contractorTicketBody > *{flex-shrink:0!important;min-width:0!important;max-width:100%!important;box-sizing:border-box!important;margin-top:0!important;margin-bottom:0!important;}
html body .ff-dialog .ff-dialog-content{min-height:0!important;overflow-y:auto!important;overflow-x:hidden!important;overscroll-behavior:contain;}
@media(max-width:600px){html body .ff-event-list .ff-event-text{flex-basis:100%!important;}}

@media print{html body .ff-event-list .ff-event-row{break-inside:avoid!important;padding:9px 12px!important;}html body .ff-event-list .ff-event-text{font-size:11px!important;}html body .ff-event-list .ff-event-meta{font-size:10px!important;}}

/* More than six entries: measured viewport, with all older events preserved. */
@media screen{
 html body .ff-event-list.ff-event-scroll{max-height:var(--ff-history-height,480px)!important;overflow-y:scroll!important;overflow-x:hidden!important;padding-right:12px!important;scrollbar-gutter:stable;scrollbar-width:thin;scrollbar-color:#ff9b68 #f1f3f6;overscroll-behavior:contain;}
 html body .ff-event-scroll::-webkit-scrollbar{width:7px;}
 html body .ff-event-scroll::-webkit-scrollbar-track{background:#f1f3f6;border-radius:8px;}
 html body .ff-event-scroll::-webkit-scrollbar-thumb{background:#ff9b68;border-radius:8px;}
 html body .ff-event-scroll:focus-visible{outline:2px solid #ff9b68;outline-offset:4px;border-radius:4px;}
}
@media print{html body .ff-event-list.ff-event-scroll{max-height:none!important;overflow:visible!important;}html body .ff-event-list .ff-event-row{padding-left:26px!important;}}

/* Category colors retain the Kitchen Flow timeline layout. */
html body .ff-event-list .ff-event-row{--event-color:#657084;--event-soft:#f1f3f6;--event-border:#dce1e9;}
html body .ff-event-list .ff-event-kind-zk{--event-color:#bd490b;--event-soft:#fff0e6;--event-border:#ffd1b5;}
html body .ff-event-list .ff-event-kind-zg{--event-color:#24244d;--event-soft:#eeeef6;--event-border:#d5d5e7;}
html body .ff-event-list .ff-event-kind-st{--event-color:#18744d;--event-soft:#eaf7f0;--event-border:#bee5ce;}
html body .ff-event-list .ff-event-kind-pl{--event-color:#6b46a2;--event-soft:#f3edfa;--event-border:#ddcdef;}
html body .ff-event-list .ff-event-kind-wy{--event-color:#335c93;--event-soft:#edf3fa;--event-border:#cadbef;}
html body .ff-event-list .ff-event-kind-do{--event-color:#087a9b;--event-soft:#e8f7fc;--event-border:#b8e6f1;}
html body .ff-event-list .ff-event-kind-ok{--event-color:#18744d;--event-soft:#eaf7f0;--event-border:#bee5ce;}
html body .ff-event-list .ff-event-kind-se{--event-color:#a44246;--event-soft:#fceef0;--event-border:#edc9ce;}
html body .ff-event-list .ff-event-row::before{background:var(--event-color);box-shadow:0 0 0 4px var(--event-soft);}
html body .ff-event-list .ff-event-category{color:var(--event-color)!important;background:var(--event-soft)!important;border-color:var(--event-border)!important;}
html body .ff-manager-last .ff-manager-activity-author{margin:0;font-size:12px;line-height:1.6;color:#747e90;overflow-wrap:anywhere;}
html body .ff-manager-last .ff-manager-activity-author strong{color:#24244d;font-weight:700;}

/* Equal spacing between activity description, author and timestamp. */
html body .ff-manager-last{display:grid;gap:8px;}
html body .ff-manager-last > :is(small,b,.ff-manager-activity-author,span){margin:0;min-width:0;line-height:1.6;}

/* Do not compress timeline content to fit the scroll viewport. */
html body .ff-event-list .ff-event-row{min-height:min-content!important;}
html body #userDetailSheet #userDetailBody{min-width:0!important;}

html body .ff-event-list .ff-event-row::before,html body .ff-event-list .ff-event-row::after{pointer-events:none;}
@media(max-width:600px){html body .ff-event-list .ff-event-heading{grid-template-columns:minmax(0,1fr)!important;}html body .ff-event-list .ff-event-category{justify-self:start!important;}}

/* User history uses the contractor section markup and the same body flow. */
html body #userDetailSheet #userDetailBody{display:flex!important;flex-direction:column!important;gap:18px!important;min-width:0!important;}
html body #userDetailSheet #userDetailBody > *{flex-shrink:0!important;min-width:0!important;max-width:100%!important;box-sizing:border-box!important;margin-top:0!important;margin-bottom:0!important;}

html body #userDetailSheet .ff-user-history-matched{padding:13px!important}

html body #userDetailSheet .ff-user-history-matched small{color:#929bab!important;font-size:8px!important;font-weight:950!important}

html body #userDetailSheet .ff-user-history-matched b{color:var(--n)!important;font-size:11px!important;line-height:1.5!important}

html body #userDetailSheet .ff-user-history-matched small{
  display:block!important;
  margin:0 0 5px!important;
  font-size:11px!important;
  line-height:1.35!important;
  font-weight:850!important;
  letter-spacing:.015em!important;
  color:#7f8899!important;
}

html body #userDetailSheet .ff-user-history-matched b{
  font-size:13px!important;
  line-height:1.55!important;
  font-weight:700!important;
  color:#24244d!important;
}
