#attendanceArea .saved-row td{
        background:#f0fdf4 !important;
      }
      #attendanceArea .saved-row:hover td{
        background:#dcfce7 !important;
      }
      #attendanceArea .dirty-row td{
        background:#fffbeb !important;
      }
      #attendanceArea .dirty-row:hover td{
        background:#fef3c7 !important;
      }
      #attendanceArea .editing-row td{
        background:#eff6ff !important;
      }
      #attendanceArea .editing-row:hover td{
        background:#dbeafe !important;
      }
      #attendanceArea .normal-row td{
        background:#fafafa !important;
      }
      #attendanceArea .normal-row:hover td{
        background:#f1f5f9 !important;
      }

/* Calendar presentation shared by Input Absen and Dashboard Absensi. */
#attendanceEmployeeTable .attendance-rate.is-high { color: #198754; }
#attendanceEmployeeTable .attendance-rate.is-medium { color: #fd7e14; }
#attendanceEmployeeTable .attendance-rate.is-low { color: #dc3545; }
#attendanceCalendarModal .attendance-calendar-navigation { display: flex; justify-content: center; align-items: end; gap: 12px; flex-wrap: wrap; margin: 16px 0; }
#attendanceCalendarModal .attendance-calendar-navigation label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; }
#attendanceCalendarModal .attendance-calendar-navigation > button { width: 40px; }
#attendanceCalendarModal .attendance-calendar-navigation input[type=number] { width: 100px; }
#attendanceCalendarModal .attendance-calendar-employment { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; font-size: 12px; margin: 12px 0; }
#attendanceCalendarModal .attendance-calendar-legend span { padding: 4px 8px; border-radius: 5px; }
#attendanceCalendarModal .attendance-calendar-grid { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); gap: 6px; margin-top: 8px; }
#attendanceCalendarModal .attendance-calendar-weekdays { margin-top: 20px; text-align: center; font-weight: bold; }
#attendanceCalendarModal .attendance-calendar-day { background: white; border: 1px solid #ddd; border-radius: 8px; min-height: 90px; padding: 6px; box-sizing: border-box; text-align: center; overflow-wrap: anywhere; }
#attendanceCalendarModal .is-morning { background: #dbeafe; }
#attendanceCalendarModal .is-present { background: #dcfce7; }
#attendanceCalendarModal .is-overtime { background: #ede9fe; }
#attendanceCalendarModal .is-off { background: #f3f4f6; }
#attendanceCalendarModal .is-absent { background: #fee2e2; }
#attendanceCalendarModal .is-missing { background: #fef3c7; }
#attendanceCalendarModal .is-before-join { background: #e2e8f0; color: #475569; }
#attendanceCalendarModal .is-after-resign { background: #d1d5db; color: #374151; }
#attendanceCalendarModal .is-adjacent { opacity: .5; }
#attendanceCalendarModal .is-today { border: 3px solid #2563eb; }
#attendanceCalendarModal .is-selected { outline: 2px solid #7c3aed; outline-offset: -2px; }
#attendanceCalendarModal .attendance-calendar-status { margin-top: 8px; font-size: 12px; font-weight: bold; }
#attendanceCalendarModal .attendance-calendar-milestone { margin-top: 4px; font-size: 10px; font-weight: bold; border-radius: 4px; background: #eff6ff; color: #1d4ed8; padding: 3px; }
#attendanceCalendarModal .attendance-calendar-note { margin-top: 5px; font-size: 10px; line-height: 1.25; color: #555; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.attendance-calendar-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.5); display: flex; justify-content: center; align-items: center; z-index: 100000; }
.attendance-calendar-panel { width: 90%; max-width: 1100px; background: white; border-radius: 12px; padding: 20px; max-height: 90vh; overflow: auto; box-sizing: border-box; }
#attendanceCalendarModal .attendance-calendar-period-title { text-align: center; margin: 16px 0; font-size: 22px; font-weight: 700; }
#attendanceCalendarModal .attendance-calendar-modal-heading { display: flex; justify-content: space-between; align-items: center; }

#attendanceCalendarModal .is-payroll-period { border:2px solid #15803d; }
#attendanceCalendarModal .is-outside-period { opacity:.35; }

/* Input attendance: aligned shared filters and compact editable columns. */
.portal-app #content-area #attendanceInputFilters {
  align-items:start;
  margin-bottom:8px;
  text-align:left;
}
.attendance-date-label { margin-bottom:12px; font-size:14px; color:#666; text-align:left; }
#attendanceArea .shared-table { table-layout:fixed; min-width:960px; }
#attendanceArea .shared-table th { min-width:0; }
#attendanceArea .shared-table th,
#attendanceArea .shared-table td { padding-left:8px; padding-right:8px; }
#attendanceArea .shared-table .shared-table-number { min-width:44px; padding-left:6px; padding-right:6px; }
#attendanceArea [data-column-key="nickname"],
#attendanceArea [data-column-key="outlet"],
#attendanceArea [data-column-key="position"],
#attendanceArea [data-column-key="save"] { white-space:nowrap; }
#attendanceArea [data-column-key="nickname"],
#attendanceArea [data-column-key="outlet"] { min-width:80px; }
#attendanceArea .shared-table-radio-options {
  min-width:0;
  justify-content:center;
  flex-wrap:nowrap;
  gap:12px;
}
#attendanceArea .shared-table-radio-options label {
  display:inline-flex;
  align-items:center;
  gap:5px;
  margin:0;
  padding:0;
  line-height:1.4;
  white-space:nowrap;
}
#attendanceArea .shared-table-radio-options input[type="radio"] {
  flex:0 0 auto;
  width:14px;
  height:14px;
  min-height:0;
  margin:0;
}
#attendanceArea .shared-table-note { width:144px; min-width:0; max-width:100%; }

#attendanceArea [data-column-key="nickname"],
#attendanceArea [data-column-key="position"] {
  white-space:normal;
  overflow-wrap:anywhere;
}

/* Keep editable attendance rows compact, including the actor and timestamp. */
#attendanceArea [data-column-key="nickname"],
#attendanceArea [data-column-key="position"],
#attendanceArea .attendance-inputby { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; overflow-wrap:normal; }
#attendanceArea .attendance-actor-time { font-size:11px; color:#666; }

#attendanceArea [data-column-key="nickname"] a,
#attendanceArea .attendance-compact-text { display:block; max-width:100%; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
