.calendar-toolbar{display:flex;gap:12px;justify-content:space-between;flex-wrap:wrap;margin-bottom:18px}.calendar-shell{display:grid;grid-template-columns:230px minmax(0,1fr);gap:20px;align-items:start}.calendar-list{position:sticky;top:94px}.calendar-choice{display:flex;align-items:center;gap:9px;padding:12px 0;cursor:pointer}.calendar-choice input{width:auto}.calendar-choice b,.calendar-choice small{display:block}.calendar-choice small{color:var(--muted,#617779);font-size:12px;margin-top:3px}.calendar-dot{width:10px;height:10px;border-radius:50%;flex:none}.calendar-list details{margin-top:18px}.calendar-main{overflow:hidden;min-height:400px}.calendar-month{display:grid;grid-template-columns:repeat(7,minmax(0,1fr))}.calendar-weekday{text-align:center;padding:14px 3px;font-weight:700;font-size:12px;background:#f5f8f8;color:#567174}.calendar-cell{min-height:122px;padding:7px;border-top:1px solid #e5eeee;border-right:1px solid #e5eeee;overflow:hidden}.calendar-cell.muted{background:#f8fafa}.calendar-cell.today{background:#edf7f4}.calendar-cell.holiday{background:#fff9ed}.calendar-day{padding:4px 8px;border:0;background:transparent;font-size:13px;font-weight:700}.calendar-cell.today .calendar-day{background:#146e62;color:white;border-radius:50%}.calendar-holiday{font-size:10px;display:block;line-height:1.3;color:#977018;margin-bottom:5px}.calendar-event{--calendar-color:#146e62;text-align:left;width:100%;display:block;border:1px solid #e3eceb;border-left:3px solid var(--calendar-color);background:white;margin:5px 0;padding:9px;border-radius:8px;min-width:0}.calendar-event b,.calendar-event span,.calendar-event small{display:block;overflow:hidden;text-overflow:ellipsis}.calendar-event span,.calendar-event small{font-size:11px;color:#627a7c}.calendar-event b{font-size:13px;margin:4px 0;overflow-wrap:anywhere}.calendar-event.compact{padding:4px;font-size:10px;line-height:1.25}.calendar-event.compact b{font-size:11px;font-weight:600}.calendar-event.compact span{font-size:10px}.calendar-event .calendar-conflict{color:#ad3c37}.calendar-agenda{padding:20px}.calendar-agenda-row{display:grid;grid-template-columns:130px minmax(0,1fr);gap:16px;align-items:center;border-bottom:1px solid #e5eeee;padding:8px 0}.calendar-agenda-date{font-size:12px;color:#63787d}.calendar-description{white-space:pre-wrap}.calendar-toolbar input[type=month]{width:170px}.span2{grid-column:1/-1}#calendarAdmin details{border:1px solid #e3ebeb;border-radius:12px;padding:16px}#calendarAdmin summary{font-weight:700;cursor:pointer;margin-bottom:15px}
@media(max-width:1100px){.calendar-shell{grid-template-columns:190px minmax(0,1fr)}.calendar-cell{min-height:100px;padding:4px}.calendar-event.compact b{font-size:10px}}
@media(max-width:800px){.calendar-shell{grid-template-columns:1fr}.calendar-list{position:static}.calendar-list .cardbody{display:flex;flex-wrap:wrap;gap:10px}.calendar-choice{min-width:150px;padding:5px}.calendar-list details,.calendar-list .note{flex-basis:100%}.calendar-month{min-width:610px}.calendar-main{overflow:auto}.calendar-agenda-row{grid-template-columns:1fr;gap:0}.calendar-toolbar{align-items:flex-start}.calendar-agenda{min-width:0}}
.calendar-toolbar input[type=month]{border:1px solid #dce7e7;background:#fff;border-radius:10px;padding:9px 11px;font:inherit;color:inherit;min-height:40px}.calendar-choice input{accent-color:#146e62}.calendar-event.compact b{white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;line-height:1.3;max-height:2.6em}

/* Monday-to-Sunday week view; horizontal scrolling stays inside the calendar. */
.calendar-week-layout{grid-template-columns:170px minmax(0,1fr)}.calendar-week-range{font-size:13px;font-weight:600;color:#546f70;margin:0 0 12px}.calendar-toolbar input[type=date]{width:165px;border:1px solid #dce7e7;border-radius:10px;padding:9px 11px;background:white;color:inherit;font:inherit;min-height:40px}.calendar-week-scroll{max-height:640px;overflow:auto;overscroll-behavior:contain;position:relative}.calendar-week{display:grid;grid-template-columns:60px repeat(7,minmax(92px,1fr));min-width:704px;--week-head-height:76px}.calendar-week-corner,.calendar-week-header{position:sticky;top:0;z-index:5;height:var(--week-head-height);background:#f4f8f7;border-bottom:1px solid #dce7e7;padding:8px 3px;text-align:center;box-sizing:border-box}.calendar-week-corner{font-size:10px;color:#617779;display:flex;align-items:center;justify-content:center}.calendar-week-header{border-left:1px solid #e1eae7}.calendar-week-header b{display:block;font-size:10px;color:#566d6c;line-height:1.35}.calendar-week-header button{border:0;background:transparent;font-size:13px;font-weight:700;padding:4px 6px}.calendar-week-header.today{background:#e3f3ed}.calendar-week-header.today button{background:#146e62;color:white;border-radius:9px}.calendar-week-header .calendar-holiday{font-size:9px;line-height:1.2;margin:0}.calendar-week-all-label,.calendar-week-all-day{position:sticky;top:var(--week-head-height);z-index:4;background:#fff;border-bottom:1px solid #dce7e7;padding:4px;min-height:55px;max-height:160px;overflow:auto}.calendar-week-all-label{font-size:9px;color:#617779;overflow-wrap:anywhere}.calendar-week-all-day{border-left:1px solid #e1eae7}.calendar-week-add{background:none;border:1px dashed #cdded7;border-radius:6px;width:100%;font-size:14px;color:#40786c;padding:2px;min-height:26px}.calendar-week-times,.calendar-week-lane{position:relative;height:1152px;min-width:0;background:repeating-linear-gradient(to bottom,transparent 0,transparent 47px,#e5eeeb 47px,#e5eeeb 48px)}.calendar-week-times{background:#f8faf9}.calendar-week-times span{position:absolute;right:5px;font-size:9px;line-height:15px;color:#617779}.calendar-week-lane{border-left:1px solid #e1eae7;background-color:#fff}.calendar-week-lane.today{background-color:#f2f9f6}.calendar-week-lane .calendar-event{position:absolute;margin:0;min-height:20px;box-sizing:border-box;overflow:hidden;padding:3px;border-radius:6px;line-height:1.15}.calendar-week-lane .calendar-event b{font-size:10px;margin:2px 0;line-height:1.2;-webkit-line-clamp:3;max-height:3.6em}.calendar-week-lane .calendar-event span{font-size:9px;white-space:normal}.calendar-week-hint{padding:9px 14px;margin:0}.calendar-week-scroll:focus-visible{outline:2px solid #146e62;outline-offset:-2px}
@media(max-width:1250px){.calendar-week-layout{grid-template-columns:1fr}.calendar-week-layout .calendar-list{position:static}.calendar-week-layout .calendar-list .cardbody{display:flex;gap:12px;flex-wrap:wrap}.calendar-week-layout .calendar-choice{min-width:155px;padding:5px}.calendar-week-layout .calendar-list details,.calendar-week-layout .calendar-list .note{flex-basis:100%}}
@media(max-width:760px){.calendar-week-scroll{max-height:560px}.calendar-week-header button{min-height:36px}.calendar-week-add{min-height:40px}.calendar-week-layout .calendar-list .cardbody{padding:14px}.calendar-week-hint{font-size:10px}}

.calendar-choice>span:last-child{min-width:0}.calendar-choice b{overflow-wrap:anywhere}.calendar-week-times span{font-size:10px}

.calendar-week-scroll-controls{display:none}@media(max-width:800px){.calendar-week-scroll-controls{display:flex;gap:8px;padding:10px 14px}.calendar-week-scroll-controls button{min-height:44px;flex:1}.calendar-week-hint{padding-bottom:56px}}

.calendar-more{margin-top:18px}.calendar-more>summary{padding:12px 0;font-weight:600;cursor:pointer}.calendar-connections{margin:12px 0 24px}#calendarAdmin>h3{margin:24px 0 10px}

/* Title-first appointments and pointer-based week editing. */
.calendar-event b{font-size:13px;line-height:1.35}.calendar-event-time{font-size:10px;opacity:.65;font-weight:400}
.calendar-week-lane{touch-action:pan-y;cursor:crosshair}.calendar-week-lane .calendar-event{padding:5px 6px}
.calendar-week-lane .calendar-event b{font-size:12px;line-height:1.3;font-weight:650;margin:0;display:block;max-height:none;-webkit-line-clamp:unset;overflow-wrap:anywhere}
.calendar-week-lane .calendar-event-time{display:none}.calendar-week-lane .calendar-movable{cursor:grab;touch-action:pan-y}
.calendar-resize-handle{display:none}.calendar-week-lane .calendar-resize-handle{display:block;position:absolute;bottom:0;left:0;right:0;height:8px;cursor:ns-resize;background:linear-gradient(transparent,rgba(20,70,60,.12));border-radius:0 0 5px 5px}
.calendar-drag-preview{position:absolute;left:2px;right:2px;z-index:8;pointer-events:none;background:rgba(20,110,98,.18);border:2px solid #146e62;border-radius:7px;padding:4px;font-size:12px;font-weight:600;overflow:hidden;box-sizing:border-box}
.calendar-gesturing{user-select:none;-webkit-user-select:none}.calendar-gesturing .calendar-event{pointer-events:none}
.calendar-touch-edit .calendar-week-lane,.calendar-touch-edit .calendar-event{touch-action:none}.calendar-week-hint{display:flex;align-items:center;gap:12px;justify-content:space-between}.calendar-touch-toggle{display:none}
@media(pointer:coarse){.calendar-touch-toggle{display:inline-flex;flex-shrink:0}.calendar-week-hint{flex-wrap:wrap}.calendar-week-lane .calendar-resize-handle{height:12px}}

.calendar-case-stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:12px;margin:18px 0}.calendar-case-stats>div{background:#f2f7f5;border-radius:12px;padding:14px}.calendar-case-stats span{display:block;font-size:12px;color:#62746f}.calendar-case-stats b{display:block;font-size:23px;margin-top:5px}.calendar-case-months{display:grid;grid-template-columns:repeat(12,1fr);gap:6px;margin:20px 0}.calendar-case-months>div{border:1px solid #dfe9e4;border-radius:8px;text-align:center;padding:8px 3px}.calendar-case-months span,.calendar-case-months b{display:block;font-size:12px}#caseCalendarYear{max-width:110px}.calendar-case-list .row{flex-wrap:wrap}@media(max-width:650px){.calendar-case-months{grid-template-columns:repeat(6,1fr)}}
