/* Employee Timeline: frozen names, horizontal daily calendar, distinct job bars.
   All controls are navigation, filters and read-only detail popups. */
#pageTimeline{min-width:0}
#pageTimeline[hidden]{display:none!important}
.timeline-shell{border:1px solid #d4e0ec;border-radius:12px;background:#fff;overflow:hidden}
.timeline-intro{padding:14px 15px 4px}
.timeline-intro h2{margin:0;color:#183b5b;font-size:19px}
.timeline-intro p{font-size:12px;color:#62798f;margin:5px 0 7px}
.timeline-toolbar{display:flex;align-items:center;gap:9px;flex-wrap:wrap;padding:8px 14px 12px}
.timeline-toolbar .timeline-period{display:flex;align-items:center;flex-wrap:wrap;gap:6px}
.timeline-toolbar .timeline-period button{white-space:nowrap}
#timelineWindowLabel{font-size:13px;font-weight:750;color:#234965;min-width:210px;text-align:center}
.timeline-toolbar .timeline-filters{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-left:auto}
.timeline-toolbar input,.timeline-toolbar select{border:1px solid #bdccdb;border-radius:7px;padding:8px 9px;font-size:12px;background:#fff;color:#214664;max-width:210px}
.timeline-toolbar input[type=search]{min-width:155px}
.timeline-toolbar label{display:flex;align-items:center;gap:5px;font-size:12px;color:#526c83}
#timelineSummary{font-size:12px;color:#58738b;padding:0 14px 10px}
.timeline-scroller{width:100%;overflow:auto;max-height:min(72vh,850px);border-top:1px solid #ccdce9;overscroll-behavior:contain;background:#fff}
.timeline-grid{width:max-content;min-width:100%}
.timeline-date-row,.timeline-person-row{display:flex;width:max-content}
.timeline-date-row{height:48px;position:sticky;top:0;z-index:9;background:#e8f0f7;box-shadow:0 2px 3px #0002}
.timeline-first-col{position:sticky;left:0;z-index:12;width:238px;min-width:238px;max-width:238px;box-sizing:border-box;padding:15px 12px;background:#dceaf7;border-right:2px solid #b5cddd;font-size:12px;font-weight:800;color:#214561}
.timeline-date-cell{display:block;box-sizing:border-box;min-width:var(--timeline-day-width,102px);width:var(--timeline-day-width,102px);height:48px;padding:11px 0;border:0;border-right:1px solid #c6d6e5;background:#e8f0f7;color:#385b78;font-size:12px;font-weight:750;cursor:pointer;white-space:nowrap;text-align:center}
.timeline-date-cell.weekend{background:#f1f3f7;color:#637489}
.timeline-date-cell.is-today{background:#d6ecff;box-shadow:inset 0 -4px 0 #2b79b4;color:#164b78}
.timeline-date-cell:hover{background:#c9e2f6}
.timeline-date-cell:focus-visible,.timeline-job-bar:focus-visible,.timeline-person-link:focus-visible,.timeline-group-toggle:focus-visible{outline:3px solid #e8a539;outline-offset:-1px;z-index:11}
.timeline-group-row{height:34px;display:flex;position:relative;background:#f2f6fa;border-bottom:1px solid #d8e3ee;box-sizing:border-box}
.timeline-group-toggle{position:sticky;left:0;display:block;z-index:5;width:238px;min-width:238px;max-width:238px;height:34px;box-sizing:border-box;border:0;border-left:5px solid #5c86ad;border-right:2px solid #b5cddd;background:#dbe8f4;color:#234e76;padding:7px 10px;cursor:pointer;font-weight:800;text-align:left;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.timeline-group-toggle span{color:#526f89;font-weight:600}
.timeline-group-toggle:hover{background:#c9dfef}
.timeline-person-row{border-bottom:1px solid #e2eaf1;background:#fff;box-sizing:border-box}
.timeline-person-row:nth-child(even){background:#fafdff}
.timeline-person-cell{position:sticky;left:0;z-index:4;box-sizing:border-box;width:238px;min-width:238px;max-width:238px;border-right:2px solid #b5cddd;background:#f4f9fd;padding:7px 10px;display:flex;flex-direction:column;justify-content:center;overflow:hidden}
.timeline-person-row:nth-child(even) .timeline-person-cell{background:#ebf3fa}
.timeline-person-link{border:0;background:none;text-align:left;color:#195a8a;padding:2px 0;font-size:12px;font-weight:750;cursor:pointer;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}
.timeline-person-link:hover{text-decoration:underline}
.timeline-person-cell small{font-size:10px;color:#75899d;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.timeline-days-track{position:relative;box-sizing:border-box;background-image:linear-gradient(to right,rgba(64,104,139,.17) 1px,transparent 1px);background-size:var(--timeline-day-width,102px) 100%;flex:none}
.timeline-job-bar{position:absolute;z-index:2;box-sizing:border-box;height:25px;display:flex;align-items:center;gap:8px;padding:4px 8px;border:0;border-radius:5px;text-align:left;overflow:hidden;cursor:pointer;white-space:nowrap;box-shadow:0 1px 2px #16283a35;font-size:11px;font-weight:750}
.timeline-job-bar:hover{filter:brightness(.89);z-index:3;box-shadow:0 2px 5px #0004}
.timeline-bar-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:none;max-width:100%}
.timeline-bar-detail{font-size:10px;font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0;opacity:.9}
.timeline-off{background:#ba3541!important;color:white!important}
.timeline-available{position:absolute;left:12px;top:18px;font-size:10px;color:#a2b5c5;font-style:italic}
.timeline-empty{padding:18px;color:#526f89;font-size:13px}
.timeline-dialog-job{font-size:16px;color:#27587e;margin:7px 0 14px}
.timeline-help{padding:10px 15px;background:#f5f9fd;border-top:1px solid #d9e6f0;color:#5d7589;font-size:11px}
@media(max-width:800px){
  .timeline-intro{padding:10px 10px 3px}
  .timeline-toolbar{padding:8px 10px}
  .timeline-toolbar .timeline-filters{width:100%;margin-left:0}
  .timeline-toolbar .timeline-filters input[type=search]{flex:1;min-width:120px}
  #timelineWindowLabel{min-width:155px;text-align:left}
  .timeline-first-col,.timeline-group-toggle,.timeline-person-cell{width:155px;min-width:155px;max-width:155px}
  .timeline-person-cell{padding:5px 7px}
  .timeline-person-link{font-size:11px}
  .timeline-scroller{max-height:calc(100dvh - 235px);min-height:250px}
}

#timelineBackButton:not([hidden]){font-weight:750;background:#e9f3ff;color:#174d7b}
#timelineStatus[hidden],#timelineBackButton[hidden],#timelineWeeksControl[hidden],#timelineDayToJobs[hidden]{display:none!important}
.timeline-single-day{width:100%;min-width:0}
.timeline-day-summary{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px;padding:16px;border-bottom:1px solid #d8e4ee;background:#f6faff}
.timeline-day-summary h3{font-size:17px;color:#204661;margin:0 0 4px}
.timeline-day-summary p{font-size:12px;color:#687f92;margin:0}
.timeline-day-counts{display:flex;flex-wrap:wrap;gap:6px}
.timeline-count{display:inline-flex;align-items:center;border-radius:20px;font-size:12px;padding:6px 10px;font-weight:700}
.timeline-count.free,.timeline-day-status.available{background:#dcefe0;color:#166c3a}
.timeline-count.working,.timeline-day-status.working{background:#dceafa;color:#255c89}
.timeline-count.off,.timeline-day-status.off{background:#ffe2e5;color:#a12a38}
.timeline-count.conflict{background:#fff0c4;color:#8c5300}
.timeline-day-group{border-bottom:1px solid #d7e4ee;padding-bottom:2px}
.timeline-day-group-toggle{position:static;max-width:none;width:100%;border-right:0;text-align:left}
.timeline-day-person{display:grid;grid-template-columns:238px minmax(0,1fr);align-items:center;gap:10px;border-top:1px solid #e9eff5;padding:7px 12px;min-height:45px}
.timeline-day-person:nth-child(odd){background:#fbfdff}
.timeline-day-name{display:flex;align-items:center;gap:8px;justify-content:space-between;min-width:0}
.timeline-day-status{font-size:10px;font-weight:750;padding:4px 7px;border-radius:18px;white-space:nowrap}
.timeline-day-assignments{display:flex;gap:5px;align-items:center;flex-wrap:wrap;min-width:0}
.timeline-day-booking{display:flex;flex-direction:column;gap:3px;align-items:start;border:0;border-radius:6px;min-width:130px;max-width:330px;padding:8px 10px;cursor:pointer;text-align:left;font-size:11px;line-height:1.35}
.timeline-day-booking:hover{filter:brightness(.9)}
.timeline-day-booking strong,.timeline-day-booking small{overflow-wrap:anywhere}
.timeline-day-booking small{font-size:10px}
.timeline-day-available{color:#6b9679;font-size:12px;font-style:italic}
.timeline-day-conflict{font-size:11px;font-weight:700;color:#986000}
@media(max-width:800px){.timeline-day-person{grid-template-columns:1fr;padding:7px 9px;gap:5px}.timeline-day-summary{padding:12px}.timeline-day-booking{max-width:100%}}

/* Make workers scheduled off unmistakably red in both daily and multiweek views. */
.timeline-day-person-off{background:#fff0f1!important;border-left:5px solid #ba3541}
.timeline-day-person-off .timeline-person-link{color:#a61f32;font-weight:800}
.timeline-day-person-off .timeline-day-name{background:#ffe1e4;border-radius:6px;padding:5px 7px}
.timeline-person-cell.timeline-person-has-off{background:#fff0f1!important;border-left:5px solid #ba3541}
.timeline-person-has-off .timeline-person-link{color:#a61f32}

.timeline-focus-banner{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:11px 14px;background:#eaf3fc;border-top:1px solid #cbdfee;border-bottom:1px solid #cbdfee;color:#1f4d73;font-size:12px}
.timeline-focus-banner[hidden]{display:none!important}
.timeline-focus-banner strong{font-size:15px}
.timeline-focus-banner .timeline-focus-clear{margin-left:auto}
