/* Scoped to attendance month view; preserve other calendar layouts. */
.calendar-late-scroll{overflow-x:auto;overscroll-behavior-x:contain}
.calendar-late-scroll>div{min-width:0;width:100%;max-width:100%;box-sizing:border-box;background:#fff!important;box-shadow:none!important;border-color:transparent!important;padding:8px!important}
.calendar-late-scroll>div>div.grid{column-gap:4px!important;row-gap:4px!important}
.calendar-late-scroll .calendar-cell{min-height:76px!important;min-width:0!important;padding:4px!important;border-radius:10px!important;border-color:#e2e8f0!important;gap:2px!important;box-shadow:none!important;transform:none!important;background:#fff}
.calendar-late-scroll .calendar-cell>div:first-child span{font-size:11px!important;font-weight:600!important}
.calendar-late-scroll .calendar-full-late-badges{display:flex;flex-direction:column;gap:2px!important}
.calendar-late-scroll .calendar-event-label{font-size:10px!important;line-height:1.35!important;padding:1px 3px!important;border-radius:6px!important;border:0!important;box-shadow:none!important;background-image:none!important;text-transform:none!important;letter-spacing:normal!important;white-space:normal!important;overflow:visible!important;overflow-wrap:anywhere;font-weight:600!important}
.calendar-late-scroll .calendar-event-label>span{font-size:10px!important;line-height:1.35!important}
.calendar-late-scroll .calendar-event-detail{display:block;margin-top:2px;font-size:9px!important;line-height:1.35!important;font-weight:500!important;text-transform:none!important;letter-spacing:normal!important}
.calendar-late-scroll .calendar-event-label:has(.calendar-event-detail){background:#fef9e8!important;color:#a16207!important}
.calendar-late-scroll .calendar-event-label[title^="OUT:"]{background:transparent!important;color:#334155!important;padding:2px 3px!important}
.calendar-late-scroll .calendar-event-label[title^="IN:"]:not(:has(.calendar-event-detail)){background:#eefbf4!important;color:#00865a!important}
.calendar-late-scroll:focus-visible{outline:2px solid #818cf8;outline-offset:2px}

.calendar-late-scroll .calendar-event-label[class*="text-indigo"],.calendar-late-scroll .calendar-event-label[class*="text-blue"]{background:#eef4ff!important;color:#3b82f6!important}

.calendar-late-scroll .calendar-event-label{min-width:0;max-width:100%;box-sizing:border-box}
@media(max-width:640px){.calendar-late-scroll>div{padding:2px!important}.calendar-late-scroll>div>div.grid{column-gap:2px!important;row-gap:4px!important}.calendar-late-scroll .calendar-cell{padding:3px!important;min-height:76px!important;border-radius:8px!important}.calendar-late-scroll .calendar-event-label,.calendar-late-scroll .calendar-event-label>span{font-size:9px!important}.calendar-late-scroll .calendar-event-detail{font-size:9px!important}}

.calendar-late-scroll .calendar-cell>div:first-child span{width:18px!important;height:18px!important}
.calendar-late-scroll>div>div.grid:first-child>div{padding-top:6px!important;padding-bottom:6px!important}

/* Tint only days with recorded check-ins; late check-ins take precedence. */
.calendar-late-scroll .calendar-cell:has(.calendar-event-label[title^="IN:"]):not(:has(.calendar-event-detail)){background-color:#f0fdf4!important}
.calendar-late-scroll .calendar-cell:has(.calendar-event-detail){background-color:#fff7ed!important}

.calendar-late-scroll .calendar-cell:has(.calendar-event-label[title="Absent" i]){background-color:#fef2f2!important}
.calendar-late-scroll .calendar-event-label[title="Absent" i]{background:#fee2e2!important;color:#dc2626!important}

/* Match each event badge to the attendance legend without replacing day-status tints. */
.calendar-late-scroll .calendar-event-label:has(.calendar-event-detail){background:#fef3c7!important;color:#b45309!important}
.calendar-late-scroll .calendar-event-label[title^="IN:"]:not(:has(.calendar-event-detail)){background:#d1fae5!important;color:#047857!important}
.calendar-late-scroll .calendar-event-label[title*="Absent" i]{background:#fee2e2!important;color:#dc2626!important}
.calendar-late-scroll .calendar-event-label[title="Week Off" i],.calendar-late-scroll .calendar-full-late-badges>div.from-orange-50:not(.calendar-event-label){background:#ffedd5!important;background-image:none!important;color:#ea580c!important;border-color:#fed7aa!important}
.calendar-late-scroll .calendar-event-label[title*="Leave" i],.calendar-late-scroll .calendar-event-label[title*="Holiday" i]{background:#e0e7ff!important;color:#4f46e5!important}
.calendar-late-scroll .calendar-event-label[title^="Tasks"]{background:#f3e8ff!important;color:#9333ea!important}
.calendar-late-scroll .calendar-event-label[title^="⏱"]{background:#e0f2fe!important;color:#0284c7!important}

/* Secondary statuses tint dates only when no attendance outcome is recorded. */
.calendar-late-scroll .calendar-cell:has(.calendar-event-label[title^="⏱"]):not(:has(.calendar-event-label[title^="IN:"],.calendar-event-detail,.calendar-event-label[title*="Absent" i],.calendar-event-label[title*="Leave" i],.calendar-event-label[title*="Holiday" i],.from-orange-50,.calendar-event-label[title^="Tasks"])){background-color:#f0f9ff!important}
.calendar-late-scroll .calendar-cell:has(.calendar-event-label[title^="Tasks"]):not(:has(.calendar-event-label[title^="IN:"],.calendar-event-detail,.calendar-event-label[title*="Absent" i],.calendar-event-label[title*="Leave" i],.calendar-event-label[title*="Holiday" i],.from-orange-50)){background-color:#faf5ff!important}
.calendar-late-scroll .calendar-cell:has(.calendar-full-late-badges>div.from-orange-50:not(.calendar-event-label)):not(:has(.calendar-event-label[title^="IN:"],.calendar-event-label[title*="Leave" i],.calendar-event-label[title*="Holiday" i])){background-color:#fff7ed!important}
.calendar-late-scroll .calendar-cell:has(.calendar-event-label[title*="Leave" i],.calendar-event-label[title*="Holiday" i]):not(:has(.calendar-event-label[title^="IN:"])){background-color:#eef2ff!important}
.calendar-late-scroll .calendar-cell:has(.calendar-event-label[title*="Paid Leave" i]):not(:has(.calendar-event-label[title^="IN:"])){background-color:#eff6ff!important}
.calendar-late-scroll .calendar-event-label[title*="Paid Leave" i]{background:#dbeafe!important;color:#1d4ed8!important}
.calendar-late-scroll .calendar-cell:has(.calendar-event-label[title="Half Day Absent" i]){background-color:#fef2f2!important}

/* Reference treatment stays compact inside existing attendance panels. */
.attendance-executive{display:flex;flex-direction:column;border-radius:20px!important}
.attendance-executive>div:first-child{background:#fff!important}
.attendance-overview{padding:8px 16px 4px;order:1}
.attendance-employee{font-size:11px;color:#64748b;margin:0 0 8px}
.attendance-summary{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px}
.attendance-summary>div{border:1px solid #e0e7ff;background:#f5f7ff;border-radius:12px;padding:8px 10px;color:#3730a3}
.attendance-summary span{display:block;font-size:8px;font-weight:700;text-transform:uppercase;letter-spacing:.03em}
.attendance-summary strong{display:block;font-size:18px;line-height:1.3;margin-top:3px}
.attendance-summary [data-tone=green]{background:#f0fdf4;border-color:#bbf7d0;color:#047857}
.attendance-summary [data-tone=amber]{background:#fffbeb;border-color:#fde68a;color:#b45309}
.attendance-summary [data-tone=red]{background:#fff1f2;border-color:#fecdd3;color:#be123c}
.attendance-summary [data-tone=slate]{background:#f8fafc;border-color:#e2e8f0;color:#475569}
.attendance-executive>.attendance-body{order:3}
.attendance-executive>.attendance-legend{order:2;background:#fff!important;gap:8px;padding:8px 16px;border-top:0}
.attendance-executive>.attendance-legend>div{border:1px solid #e2e8f0;border-radius:20px;padding:3px 7px}
.attendance-executive .calendar-late-scroll>div>div.grid:first-child>div{background:#f8fafc;border:1px solid #eef2f7;border-radius:8px;letter-spacing:.06em!important}
.attendance-executive .calendar-late-scroll>div>div.grid:first-child>div:first-child{background:#fff5f6;border-color:#ffe4e6}
.attendance-executive .calendar-late-scroll .calendar-cell[data-attendance-day=weekoff]{background-color:#fffbeb!important;background-image:repeating-linear-gradient(-45deg,rgba(245,158,11,.035) 0 6px,transparent 6px 12px)!important;border-color:#fde68a!important}
.attendance-executive .calendar-late-scroll .calendar-cell[data-attendance-day=absent]{background-color:#fff7f8!important;background-image:repeating-linear-gradient(-45deg,rgba(239,68,68,.025) 0 6px,transparent 6px 12px)!important;border-color:#fda4af!important}
.attendance-executive .calendar-late-scroll .calendar-cell[data-selected=true]{outline:2px solid #6366f1!important;outline-offset:0;box-shadow:0 0 0 3px #e0e7ff!important;border-color:#818cf8!important}
.attendance-executive .calendar-late-scroll .calendar-cell[data-today=true]:not([data-selected=true]){outline:1px solid #60a5fa;border-color:#60a5fa!important}
.attendance-day-tag{position:absolute;top:6px;right:5px;font-size:6px;font-weight:700;color:#4f46e5;background:#e0e7ff;border-radius:3px;padding:2px;text-transform:uppercase}
@media(max-width:640px){.attendance-overview{padding:6px}.attendance-summary{gap:3px}.attendance-summary>div{padding:5px 3px;border-radius:7px}.attendance-summary span{font-size:7px}.attendance-summary strong{font-size:14px}.attendance-day-tag{display:none}}

.attendance-executive .calendar-event-label[title="Login Error" i]{background:#fff1f2!important;color:#e11d48!important;border:1px solid #fecdd3!important}

/* Keep the late-day pattern behind the labels for clear reading. */
.attendance-executive .calendar-late-scroll .calendar-cell[data-attendance-day=late]{background-image:repeating-linear-gradient(-45deg,rgba(245,158,11,.045) 0 6px,transparent 6px 12px)!important;border-color:#fcd98b!important}

/* Empty leading slots and selected-day badges must not change row sizing. */
.attendance-executive .calendar-late-scroll>div>div.grid:last-child{grid-auto-rows:minmax(84px,1fr)}
.attendance-executive .calendar-late-scroll>div>div.grid:last-child>div:not(.calendar-cell){min-height:0!important}
.attendance-executive .calendar-cell>div:first-of-type>span{width:18px!important;height:18px!important;font-size:11px!important;flex-shrink:0}

.attendance-executive .calendar-late-scroll .calendar-cell[data-attendance-day=present]{background-image:repeating-linear-gradient(-45deg,rgba(16,185,129,.045) 0 6px,transparent 6px 12px)!important}
.attendance-executive .calendar-late-scroll .calendar-cell[data-attendance-day=weekoff]{background-image:repeating-linear-gradient(-45deg,rgba(245,158,11,.06) 0 6px,transparent 6px 12px)!important}

/* Paid leave keeps its blue identity and never overrides a recorded attendance outcome. */
.attendance-executive .calendar-late-scroll .calendar-cell[data-attendance-day=leave]:has(.calendar-event-label[title*="Paid Leave" i]){background-image:repeating-linear-gradient(-45deg,rgba(59,130,246,.055) 0 6px,transparent 6px 12px)!important;border-color:#bfdbfe!important}

/* Neutral pills separate daily details from the patterned date background. */
.attendance-executive .calendar-late-scroll .calendar-cell .calendar-full-late-badges>div{background:#fff!important;background-image:none!important;color:#111827!important;border:1px solid #e2e8f0!important;border-radius:8px!important;box-shadow:0 1px 2px rgba(15,23,42,.04)!important;padding:2px 4px!important}
.attendance-executive .calendar-late-scroll .calendar-cell .calendar-full-late-badges .calendar-event-label[title^="IN:"]{color:#047857!important}
.attendance-executive .calendar-late-scroll .calendar-cell .calendar-full-late-badges .calendar-event-label[title^="OUT:"]{color:#b91c1c!important}
.attendance-executive .calendar-late-scroll .calendar-cell .calendar-event-detail{color:#b45309!important}

/* Compact visual shift range; the title retains the full original times. */
.attendance-executive .calendar-late-scroll .calendar-cell .calendar-full-late-badges .calendar-event-label[title^="⏱"]{white-space:nowrap!important;overflow-wrap:normal!important;padding:2px 1px!important}
.attendance-executive .calendar-event-label[title^="⏱"]>span{font-size:8px!important;white-space:nowrap!important;letter-spacing:-.15px!important}
@media(max-width:640px){.attendance-executive .calendar-event-label[title^="⏱"]>span{font-size:6.5px!important;letter-spacing:-.2px!important}}

@media(max-width:640px){.attendance-executive .calendar-event-label[title^="⏱"]>span[data-shift-compact]{font-size:0!important}.attendance-executive .calendar-event-label[title^="⏱"]>span[data-shift-compact]::after{content:attr(data-shift-compact);font-size:6.5px;letter-spacing:-.2px}}
