.calendar-controls { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; padding: 16px; background: var(--surface-color); border-radius: var(--radius-lg); border: 1px solid var(--border-color); flex-wrap: wrap; gap: 16px; }
.calendar-nav { display: flex; align-items: center; gap: 16px; }
.calendar-controls h2 { font-size: 20px; font-weight: 600; color: var(--text-primary); margin: 0; }
.calendar-view-switcher { display: flex; gap: 8px; }
.calendar-view-switcher .btn.active { background-color: var(--primary-color); color: white; }
.calendar-container { background: var(--surface-color); border-radius: var(--radius-xl); box-shadow: var(--shadow-sm); border: 1px solid var(--border-color); overflow-x: auto; }
.calendar-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.calendar-table th { background: var(--primary-color); color: white; font-weight: 600; text-align: center; font-size: 14px; padding: 12px 10px; position: sticky; top: 0; z-index: 2; }
.calendar-table td { border: 1px solid var(--border-color); padding: 8px 8px 28px 8px; vertical-align: top; position: relative; min-height: 120px; cursor: pointer; }
.calendar-table td:hover { background-color: #f0f8ff !important; }
.date-header { display: flex; align-items: baseline; margin-bottom: 8px; }
.date-number { font-weight: 600; font-size: 16px; }
.calendar-table td.other-month { background-color: #fdfdfd !important; }
.calendar-table td.today { background-color: #fff3e0 !important; box-shadow: inset 0 0 0 2px var(--primary-color) !important; }
.staff-grid { display: grid; gap: 4px; }
.staff-compact { padding: 5px 8px; border-radius: 4px; font-size: 12px; display: flex; justify-content: space-between; align-items: baseline; border-left: 3px solid transparent; }
.staff-name { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.staff-shift-info { font-size: 11px; font-style: italic; color: var(--text-secondary); flex-shrink: 0; }
.staff-on { background-color: #e0f2f1; color: #004d40; border-left-color: #4db6ac; }
.staff-off { background-color: #ffeadd; color: #c55a11; border-left-color: var(--primary-color); }
.staff-sick { background-color: #fef2f2; color: #b91c1c; border-left-color: #ef4444; }
.staff-vacation { background-color: #eff6ff; color: #1d4ed8; border-left-color: #3b82f6; }
.staff-no-call-no-show { background-color: #f3f4f6; color: #1f2937; border-left-color: #6b7280; }
.staff-custom-hours { background-color: #fff8e1 !important; color: #795548 !important; border-left-color: #ffc107 !important; }
.more-indicator { text-align: center; font-size: 11px; color: var(--text-secondary); background-color: #f0f0f0; padding: 3px 0; border-radius: 3px; margin-top: 4px; }

/* === FIX START: Added text truncation for notes === */
.direct-note-display { 
    position: absolute; 
    bottom: 5px; 
    left: 8px; 
    right: 8px; 
    font-size: 11px; 
    color: var(--text-primary); 
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
/* === FIX END === */

.cal-modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.6); z-index: 1000; overflow-y: auto; padding: 20px; align-items: center; justify-content: center; }
.cal-modal .modal-content { position: relative; background-color: white; margin: auto; padding: 25px; width: 90%; max-width: 650px; border-radius: var(--radius-xl); box-shadow: var(--shadow-lg); }
.cal-modal .close { position: absolute; top: 10px; right: 15px; font-size: 28px; font-weight: bold; cursor: pointer; color: var(--text-muted); }
.cal-modal h2 { font-size: 24px; font-weight: 600; margin: 0 0 20px 0; text-align: center; }
.view-content h3 { font-size: 18px; font-weight: 600; margin-top: 15px; margin-bottom: 8px; border-bottom: 1px solid #e0e0e0; padding-bottom: 5px; }
.view-staff-list { margin-bottom: 15px; }
.view-staff-item { padding: 8px 10px; margin-bottom: 6px; border-radius: 4px; background-color: #f9f9f9; border-left: 3px solid var(--text-muted); font-size: 14px; }
.view-staff-item.status-on { border-left-color: #4db6ac; }
.view-staff-item.status-off { border-left-color: var(--primary-color); }
.view-staff-item.status-sick { border-left-color: #ef4444; }
.view-staff-item.status-vacation { border-left-color: #3b82f6; }
.view-staff-item.status-no-call-no-show { border-left-color: #6b7280; }
.view-notes { font-style: italic; color: var(--text-secondary); border-left: 3px solid var(--primary-color); padding: 10px 15px; min-height: 25px; background-color: #fffaf0; border-radius: 0 4px 4px 0; }
.day-view-container, .week-view-container, .my-schedule-container { padding: 16px; }
.week-day-item { border: 1px solid var(--border-color); border-radius: var(--radius-lg); margin-bottom: 16px; }
.week-day-header { background-color: #f8fafc; padding: 12px; font-weight: 600; border-bottom: 1px solid var(--border-color); border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.week-day-body { padding: 12px; }
.week-day-body h4 { font-size: 14px; margin-bottom: 8px; color: var(--text-secondary); }
.no-entries { color: var(--text-muted); font-style: italic; }
.week-day-notes { margin-top: 12px; padding-top: 8px; border-top: 1px dotted var(--border-color); font-size: 13px; }
.my-schedule-container .schedule-entry { display: flex; justify-content: space-between; align-items: center; padding: 12px; border-bottom: 1px solid var(--border-color); }
.my-schedule-container .schedule-entry:last-child { border-bottom: none; }
.schedule-date { font-weight: 600; }
.schedule-status { font-weight: 500; padding: 4px 8px; border-radius: var(--radius-md); color: white; }
.schedule-status.status-on { background-color: #10b981; }
.schedule-status.status-off { background-color: #64748b; }
.schedule-status.status-sick { background-color: #ef4444; }
.schedule-status.status-vacation { background-color: #3b82f6; }
.schedule-status.status-no-call-no-show { background-color: #1f2937; }
@media screen and (max-width: 768px) {
    .calendar-controls { flex-direction: column; }
    .calendar-table { min-width: calc(7 * 140px); }
    .calendar-table th, .calendar-table td { width: 140px; min-width: 140px; }
    .cal-modal { padding: 0; }
    .cal-modal .modal-content { width: 100%; height: 100%; max-width: none; max-height: none; border-radius: 0; display: flex; flex-direction: column; }
    .cal-modal .modal-content .view-content { flex-grow: 1; overflow-y: auto; }
}